com.stimulsoft.report.components.textFormats
Class StiFormatService

java.lang.Object
  extended by com.stimulsoft.base.serializing.StiSerializedObject
      extended by com.stimulsoft.base.services.StiService
          extended by com.stimulsoft.report.components.textFormats.StiFormatService
All Implemented Interfaces:
IStiDefault, IStiJsonReportObject, IStiSerializable, IStiSerializableRef, java.lang.Cloneable
Direct Known Subclasses:
StiBooleanFormatService, StiCustomFormatService, StiDateFormatService, StiGeneralFormatService, StiNumberFormatService, StiTimeFormatService

public abstract class StiFormatService
extends StiService
implements IStiDefault, IStiJsonReportObject

Describes a base service for formatting of the text.


Field Summary
 
Fields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT
 
Constructor Summary
StiFormatService()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String Format(java.lang.Object arg, java.util.Locale locale)
          Formats the specified object in order of format and returns a string.
 java.lang.String format(java.lang.String format, java.lang.Object arg, java.util.Locale locale)
          Formats the specified object in order of format and returns a string.
 boolean getIsFormatStringFromVariable()
          Internal use only.
 java.lang.String getNativeFormatString()
          Returns native format string.
abstract  int getPosition()
           
abstract  java.lang.Object getSample()
          Gets value to show a sample of formatting.
 java.lang.String getServiceCategory()
          Gets a service category.
 java.lang.Class<?> getServiceType()
          Gets a service type.
 StiEnumSet<StiTextFormatState> getState()
           
 java.lang.String getStringFormat()
          Gets or sets string of formatting.
 int hashCode()
           
 boolean isDefault()
           
 void LoadFromJsonObject(JSONObject jObject)
           
static StiFormatService LoadFromJsonObjectInternal(JSONObject jObject)
           
 JSONObject SaveToJsonObject(StiJsonSaveMode mode)
           
 void setState(StiEnumSet<StiTextFormatState> state)
           
 void setStringFormat(java.lang.String value)
           
 java.lang.String toString()
           
 
Methods inherited from class com.stimulsoft.base.services.StiService
clone, getProperties, getServiceEnabled, getServiceInfo, getServiceName, isPropertyPresent, MemberwiseClone, packService, properties, setProperties, setServiceEnabled
 
Methods inherited from class com.stimulsoft.base.serializing.StiSerializedObject
cleanReference, getReference, setReference
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StiFormatService

public StiFormatService()
Method Detail

isDefault

public final boolean isDefault()
Specified by:
isDefault in interface IStiDefault

getServiceCategory

public final java.lang.String getServiceCategory()
Gets a service category.

Overrides:
getServiceCategory in class StiService

getServiceType

public final java.lang.Class<?> getServiceType()
Gets a service type.

Specified by:
getServiceType in class StiService

getPosition

public abstract int getPosition()

getSample

public abstract java.lang.Object getSample()
Gets value to show a sample of formatting.


getNativeFormatString

public java.lang.String getNativeFormatString()
Returns native format string.


getIsFormatStringFromVariable

public final boolean getIsFormatStringFromVariable()
Internal use only.


getStringFormat

public java.lang.String getStringFormat()
Gets or sets string of formatting.


setStringFormat

public void setStringFormat(java.lang.String value)

Format

public java.lang.String Format(java.lang.Object arg,
                               java.util.Locale locale)
Formats the specified object in order of format and returns a string.

Parameters:
arg - Object for formatting.
Returns:
Formatted string.

format

public java.lang.String format(java.lang.String format,
                               java.lang.Object arg,
                               java.util.Locale locale)
Formats the specified object in order of format and returns a string.

Parameters:
format - String of formatting.
arg - Object for formatting.
Returns:
Formatted string.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getState

public StiEnumSet<StiTextFormatState> getState()
Returns:
the state

setState

public void setState(StiEnumSet<StiTextFormatState> state)
Parameters:
state - the state to set

SaveToJsonObject

public JSONObject SaveToJsonObject(StiJsonSaveMode mode)
                            throws JSONException
Specified by:
SaveToJsonObject in interface IStiJsonReportObject
Throws:
JSONException

LoadFromJsonObject

public void LoadFromJsonObject(JSONObject jObject)
                        throws JSONException
Specified by:
LoadFromJsonObject in interface IStiJsonReportObject
Throws:
JSONException

LoadFromJsonObjectInternal

public static StiFormatService LoadFromJsonObjectInternal(JSONObject jObject)
                                                   throws JSONException
Throws:
JSONException