com.stimulsoft.report.components.textFormats
Class StiCurrencyFormatService

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

public class StiCurrencyFormatService
extends StiNumberFormatService

Describes a service for the text formatting as currency values.


Field Summary
 
Fields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT
 
Constructor Summary
StiCurrencyFormatService()
           
StiCurrencyFormatService(int positivePattern, int negativePattern, int decimalPlaces, java.lang.String decimalSeparator, int decimalDigits, java.lang.String groupSeparator, int groupSize, java.lang.String symbol, boolean useGroupSeparator, boolean useLocalSetting, java.lang.String nullDisplay)
          Creates a new format of the type StiCurrencyFormatService with specified arguments.
StiCurrencyFormatService(int positivePattern, int negativePattern, java.lang.String decimalSeparator, int decimalDigits, java.lang.String groupSeparator, int groupSize, java.lang.String symbol, boolean useGroupSeparator, boolean useLocalSetting, java.lang.String nullDisplay)
          Creates a new format of the type StiCurrencyFormatService with specified arguments.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String format(java.lang.String stringFormat, java.lang.Object arg, java.util.Locale locale)
          Formats the specified object in order of regulations and returns a string.
 java.lang.String getCulture()
           
 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.
 int getPosition()
           
 int getPositivePattern()
          Gets or sets the format pattern for positive currency values.
 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.
 java.lang.String getSymbol()
          Gets or sets a currency symbol.
 int hashCode()
           
 void LoadFromJsonObject(JSONObject jObject)
           
 JSONObject SaveToJsonObject(StiJsonSaveMode mode)
           
 void setCulture(java.lang.String culture)
           
 void setPositivePattern(int value)
           
 void setStringFormat(java.lang.String value)
           
 void setSymbol(java.lang.String value)
           
 
Methods inherited from class com.stimulsoft.report.components.textFormats.StiNumberFormatService
getNullDisplay, getUseGroupSeparator, getUseLocalSetting, setDecimalDigits, setDecimalSeparator, setGroupSeparator, setGroupSize, setNegativePattern, setNullDisplay, setUseGroupSeparator, setUseLocalSetting
 
Methods inherited from class com.stimulsoft.report.components.textFormats.StiFormatService
Format, getIsFormatStringFromVariable, getServiceCategory, getServiceType, getState, 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

StiCurrencyFormatService

public StiCurrencyFormatService()

StiCurrencyFormatService

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

Parameters:
positivePattern - The format pattern for positive currency values.
negativePattern - The format pattern for negative numeric values.
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.
symbol - Currency symbol.
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.

StiCurrencyFormatService

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

Parameters:
positivePattern - The format pattern for positive currency values.
negativePattern - The format pattern for negative numeric values.
decimalPlaces - Do not use 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.
symbol - Currency symbol.
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.
Method Detail

getServiceName

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

Overrides:
getServiceName in class StiNumberFormatService

getPosition

public int getPosition()
Overrides:
getPosition in class StiNumberFormatService

getCulture

public java.lang.String getCulture()
Returns:
the culture

setCulture

public void setCulture(java.lang.String culture)
Parameters:
culture - the culture to set

getPositivePattern

public final int getPositivePattern()
Gets or sets the format pattern for positive currency values.


getNegativePattern

public final int getNegativePattern()
Description copied from class: StiNumberFormatService
Gets or sets the format pattern for negative numeric values.

Overrides:
getNegativePattern in class StiNumberFormatService

getDecimalDigits

public int getDecimalDigits()
Description copied from class: StiNumberFormatService
Gets or sets indicates the number of decimal places to use in currency values.

Overrides:
getDecimalDigits in class StiNumberFormatService

getDecimalSeparator

public final java.lang.String getDecimalSeparator()
Description copied from class: StiNumberFormatService
Gets or sets the string to use as the decimal separator in currency values.

Overrides:
getDecimalSeparator in class StiNumberFormatService

setPositivePattern

public final void setPositivePattern(int value)

getGroupSeparator

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

Overrides:
getGroupSeparator in class StiNumberFormatService

getGroupSize

public int getGroupSize()
Description copied from class: StiNumberFormatService
Gets or sets the number of digits in group to the left of the decimal in currency values.

Overrides:
getGroupSize in class StiNumberFormatService

getSymbol

public final java.lang.String getSymbol()
Gets or sets a currency symbol.


setSymbol

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

getNativeFormatString

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

Overrides:
getNativeFormatString in class StiNumberFormatService

getSample

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

Overrides:
getSample in class StiNumberFormatService

getStringFormat

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

Overrides:
getStringFormat in class StiNumberFormatService

setStringFormat

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

hashCode

public int hashCode()
Overrides:
hashCode in class StiFormatService

equals

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

format

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

Overrides:
format in class StiNumberFormatService
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 StiNumberFormatService
Throws:
JSONException

LoadFromJsonObject

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