Class StiCurrencyFormatService
java.lang.Object
com.stimulsoft.base.serializing.StiSerializedObject
com.stimulsoft.base.services.StiService
com.stimulsoft.report.components.textFormats.StiFormatService
com.stimulsoft.report.components.textFormats.StiNumberFormatService
com.stimulsoft.report.components.textFormats.StiCurrencyFormatService
- All Implemented Interfaces:
IStiDefault,IStiJsonReportObject,IStiSerializable,IStiSerializableRef,IStiSerializableToDocument,Cloneable
- Direct Known Subclasses:
StiPercentageFormatService
-
Field Summary
Fields inherited from class com.stimulsoft.base.services.StiService
propertiesFields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT -
Constructor Summary
ConstructorsConstructorDescriptionStiCurrencyFormatService(int positivePattern, int negativePattern, int decimalPlaces, String decimalSeparator, int decimalDigits, String groupSeparator, int groupSize, String symbol, boolean useGroupSeparator, boolean useLocalSetting, String nullDisplay) Creates a new format of the type StiCurrencyFormatService with specified arguments.StiCurrencyFormatService(int positivePattern, int negativePattern, String decimalSeparator, int decimalDigits, String groupSeparator, int groupSize, String symbol, boolean useGroupSeparator, boolean useLocalSetting, String nullDisplay) Creates a new format of the type StiCurrencyFormatService with specified arguments. -
Method Summary
Modifier and TypeMethodDescriptionbooleanFormats the specified object in order of regulations and returns a string.intGets or sets indicates the number of decimal places to use in currency values.final StringGets or sets the string to use as the decimal separator in currency values.Gets or sets the string that separates groups of digits to the left of the decimal in currency values.int[]Returns native format string.final intGets or sets the format pattern for negative numeric values.intfinal intGets or sets the format pattern for positive currency values.Gets value to show a sample of formatting.Gets a service name.Gets or sets string of formatting.final StringGets or sets a currency symbol.inthashCode()voidLoadFromJsonObject(JSONObject jObject) voidsetCulture(String culture) final voidsetPositivePattern(int value) voidsetStringFormat(String value) final voidMethods inherited from class com.stimulsoft.report.components.textFormats.StiNumberFormatService
FillLocalSetting, getDecimalFormatSymbols, getGroupSize, getNullDisplay, getUseGroupSeparator, getUseLocalSetting, setDecimalDigits, setDecimalSeparator, setGroupSeparator, setGroupSize, setNegativePattern, setNullDisplay, setUseGroupSeparator, setUseLocalSettingMethods inherited from class com.stimulsoft.report.components.textFormats.StiFormatService
deserialize, Format, getIsFormatStringFromVariable, getServiceCategory, getServiceType, getState, isDefault, LoadFromJsonObjectInternal, serialize, setState, toStringMethods inherited from class com.stimulsoft.base.services.StiService
clone, getProperties, getServiceEnabled, getServiceInfo, isPropertyPresent, MemberwiseClone, packService, properties, setProperties, setServiceEnabledMethods inherited from class com.stimulsoft.base.serializing.StiSerializedObject
cleanReference, getReference, setReference
-
Constructor Details
-
StiCurrencyFormatService
public StiCurrencyFormatService() -
StiCurrencyFormatService
public StiCurrencyFormatService(int positivePattern, int negativePattern, String decimalSeparator, int decimalDigits, String groupSeparator, int groupSize, String symbol, boolean useGroupSeparator, boolean useLocalSetting, 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, String decimalSeparator, int decimalDigits, String groupSeparator, int groupSize, String symbol, boolean useGroupSeparator, boolean useLocalSetting, 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 Details
-
getServiceName
Gets a service name.- Overrides:
getServiceNamein classStiNumberFormatService
-
getPosition
public int getPosition()- Overrides:
getPositionin classStiNumberFormatService
-
getCulture
- Returns:
- the culture
-
setCulture
- 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:StiNumberFormatServiceGets or sets the format pattern for negative numeric values.- Overrides:
getNegativePatternin classStiNumberFormatService
-
getDecimalDigits
public int getDecimalDigits()Description copied from class:StiNumberFormatServiceGets or sets indicates the number of decimal places to use in currency values.- Overrides:
getDecimalDigitsin classStiNumberFormatService
-
getDecimalSeparator
Description copied from class:StiNumberFormatServiceGets or sets the string to use as the decimal separator in currency values.- Overrides:
getDecimalSeparatorin classStiNumberFormatService
-
setPositivePattern
public final void setPositivePattern(int value) -
getGroupSeparator
Description copied from class:StiNumberFormatServiceGets or sets the string that separates groups of digits to the left of the decimal in currency values.- Overrides:
getGroupSeparatorin classStiNumberFormatService
-
getGroupSizes
public int[] getGroupSizes() -
getSymbol
Gets or sets a currency symbol. -
setSymbol
-
getNativeFormatString
Returns native format string.- Overrides:
getNativeFormatStringin classStiNumberFormatService
-
getSample
Gets value to show a sample of formatting.- Overrides:
getSamplein classStiNumberFormatService
-
getStringFormat
Gets or sets string of formatting.- Overrides:
getStringFormatin classStiNumberFormatService
-
setStringFormat
- Overrides:
setStringFormatin classStiNumberFormatService
-
hashCode
public int hashCode()- Overrides:
hashCodein classStiFormatService
-
equals
- Overrides:
equalsin classStiNumberFormatService
-
format
Formats the specified object in order of regulations and returns a string.- Overrides:
formatin classStiNumberFormatService- Parameters:
stringFormat- String of formatting.arg- Object for formatting.format- String of formatting.- Returns:
- Formatted string.
-
SaveToJsonObject
- Specified by:
SaveToJsonObjectin interfaceIStiJsonReportObject- Overrides:
SaveToJsonObjectin classStiNumberFormatService- Throws:
JSONException
-
LoadFromJsonObject
- Specified by:
LoadFromJsonObjectin interfaceIStiJsonReportObject- Overrides:
LoadFromJsonObjectin classStiNumberFormatService- Throws:
JSONException
-