com.stimulsoft.report.components.textFormats
Class StiNumberFormatService

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
              extended by com.stimulsoft.report.components.textFormats.StiNumberFormatService
All Implemented Interfaces:
IStiDefault, IStiJsonReportObject, IStiSerializable, IStiSerializableRef, java.lang.Cloneable
Direct Known Subclasses:
StiCurrencyFormatService

public class StiNumberFormatService
extends StiFormatService

Describes a service for the text formatting as number values.


Field Summary
 
Fields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT
 
Constructor Summary
StiNumberFormatService()
           
StiNumberFormatService(int negativePattern, int decimalPlaces, java.lang.String decimalSeparator, int decimalDigits, java.lang.String groupSeparator, int groupSize, boolean useGroupSeparator, boolean useLocalSetting, java.lang.String nullDisplay)
           
StiNumberFormatService(int negativePattern, java.lang.String decimalSeparator, int decimalDigits, java.lang.String groupSeparator, int groupSize, boolean useGroupSeparator, boolean useLocalSetting, java.lang.String nullDisplay)
          Creates a new format of the type StiNumberFormatService with specified arguments.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String format(java.lang.String stringFormat, java.lang.Object value, java.util.Locale locale)
          Formats the specified object in order of regulations and returns a string.
 int getDecimalDigits()
          Gets or sets indicates the number of decimal places to use in currency values.
 java.lang.String getDecimalSeparator()
          Gets or sets the string to use as the decimal separator in currency values.
 java.lang.String getGroupSeparator()
          Gets or sets the string that separates groups of digits to the left of the decimal in currency values.
 int getGroupSize()
          Gets or sets the number of digits in group to the left of the decimal in currency values.
 java.lang.String getNativeFormatString()
          Returns native format string.
 int getNegativePattern()
          Gets or sets the format pattern for negative numeric values.
 java.lang.String getNullDisplay()
          Gets or sets string value to show the value null.
 int getPosition()
           
 java.lang.Object getSample()
          Gets value to show a sample of formatting.
 java.lang.String getServiceName()
          Gets a service name.
 java.lang.String getStringFormat()
          Gets or sets string of formatting.
 boolean getUseGroupSeparator()
          Gets or sets value indicates it is necessary to use a group separator.
 boolean getUseLocalSetting()
          Gets or sets value indicates it is necessary to use local settings.
 void LoadFromJsonObject(JSONObject jObject)
           
 JSONObject SaveToJsonObject(StiJsonSaveMode mode)
           
 void setDecimalDigits(int value)
           
 void setDecimalSeparator(java.lang.String value)
           
 void setGroupSeparator(java.lang.String value)
           
 void setGroupSize(int value)
           
 void setNegativePattern(int value)
           
 void setNullDisplay(java.lang.String value)
           
 void setStringFormat(java.lang.String value)
           
 void setUseGroupSeparator(boolean value)
           
 void setUseLocalSetting(boolean value)
           
 
Methods inherited from class com.stimulsoft.report.components.textFormats.StiFormatService
Format, getIsFormatStringFromVariable, getServiceCategory, getServiceType, getState, hashCode, isDefault, LoadFromJsonObjectInternal, setState, toString
 
Methods inherited from class com.stimulsoft.base.services.StiService
clone, getProperties, getServiceEnabled, getServiceInfo, 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

StiNumberFormatService

public StiNumberFormatService()

StiNumberFormatService

public StiNumberFormatService(int negativePattern,
                              java.lang.String decimalSeparator,
                              int decimalDigits,
                              java.lang.String groupSeparator,
                              int groupSize,
                              boolean useGroupSeparator,
                              boolean useLocalSetting,
                              java.lang.String nullDisplay)
Creates a new format of the type StiNumberFormatService with specified arguments.

Parameters:
negativePattern - The format pattern for negative numeric values.
decimalPlaces - Do not use this argument.
decimalSeparator - The string to use as the decimal separator in currency values.
decimalDigits - The number of decimal places to use in currency values.
groupSeparator - The string that separates groups of digits to the left of the decimal in currency values.
groupSize - The number of digits in group to the left of the decimal in currency values.
useGroupSeparator - Value indicates that it is necessary to use a group separator.
useLocalSetting - Value indicates that it is necessary to use local settings.
nullDisplay - String value to show the value null.

StiNumberFormatService

public StiNumberFormatService(int negativePattern,
                              int decimalPlaces,
                              java.lang.String decimalSeparator,
                              int decimalDigits,
                              java.lang.String groupSeparator,
                              int groupSize,
                              boolean useGroupSeparator,
                              boolean useLocalSetting,
                              java.lang.String nullDisplay)
Method Detail

getServiceName

public java.lang.String getServiceName()
Gets a service name.

Overrides:
getServiceName in class StiService

getPosition

public int getPosition()
Specified by:
getPosition in class StiFormatService

getNullDisplay

public final java.lang.String getNullDisplay()
Gets or sets string value to show the value null.


setNullDisplay

public final void setNullDisplay(java.lang.String value)

getNegativePattern

public int getNegativePattern()
Gets or sets the format pattern for negative numeric values.


setNegativePattern

public final void setNegativePattern(int value)

getDecimalSeparator

public java.lang.String getDecimalSeparator()
Gets or sets the string to use as the decimal separator in currency values.


setDecimalSeparator

public final void setDecimalSeparator(java.lang.String value)

getDecimalDigits

public int getDecimalDigits()
Gets or sets indicates the number of decimal places to use in currency values.


setDecimalDigits

public final void setDecimalDigits(int value)

getGroupSeparator

public java.lang.String getGroupSeparator()
Gets or sets the string that separates groups of digits to the left of the decimal in currency values.


setGroupSeparator

public final void setGroupSeparator(java.lang.String value)

getGroupSize

public int getGroupSize()
Gets or sets the number of digits in group to the left of the decimal in currency values.


setGroupSize

public final void setGroupSize(int value)

getUseGroupSeparator

public final boolean getUseGroupSeparator()
Gets or sets value indicates it is necessary to use a group separator.


setUseGroupSeparator

public final void setUseGroupSeparator(boolean value)

getUseLocalSetting

public final boolean getUseLocalSetting()
Gets or sets value indicates it is necessary to use local settings.


setUseLocalSetting

public final void setUseLocalSetting(boolean value)

getStringFormat

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

Overrides:
getStringFormat in class StiFormatService

setStringFormat

public void setStringFormat(java.lang.String value)
Overrides:
setStringFormat in class StiFormatService

getSample

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

Specified by:
getSample in class StiFormatService

getNativeFormatString

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

Overrides:
getNativeFormatString in class StiFormatService

equals

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

format

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

Overrides:
format in class StiFormatService
Parameters:
format - String of formatting.
arg - Object for formatting.
Returns:
Formatted string.

SaveToJsonObject

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

LoadFromJsonObject

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