Class StiNumberFormatService
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
- All Implemented Interfaces:
IStiDefault,IStiJsonReportObject,IStiSerializable,IStiSerializableRef,IStiSerializableToDocument,Cloneable
- Direct Known Subclasses:
StiCurrencyFormatService
-
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
ConstructorsConstructorDescriptionStiNumberFormatService(int negativePattern, int decimalPlaces, String decimalSeparator, int decimalDigits, String groupSeparator, int groupSize, boolean useGroupSeparator, boolean useLocalSetting, String nullDisplay) StiNumberFormatService(int negativePattern, String decimalSeparator, int decimalDigits, String groupSeparator, int groupSize, boolean useGroupSeparator, boolean useLocalSetting, String nullDisplay) Creates a new format of the type StiNumberFormatService with specified arguments. -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected static voidFillLocalSetting(DecimalFormat format) Formats 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.protected DecimalFormatSymbolsGets 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.intGets or sets the number of digits in group to the left of the decimal in currency values.Returns native format string.intGets or sets the format pattern for negative numeric values.final StringGets or sets string value to show the value null.intGets value to show a sample of formatting.Gets a service name.Gets or sets string of formatting.final booleanGets or sets value indicates it is necessary to use a group separator.final booleanGets or sets value indicates it is necessary to use local settings.voidLoadFromJsonObject(JSONObject jObject) final voidsetDecimalDigits(int value) final voidsetDecimalSeparator(String value) final voidsetGroupSeparator(String value) final voidsetGroupSize(int value) final voidsetNegativePattern(int value) final voidsetNullDisplay(String value) voidsetStringFormat(String value) final voidsetUseGroupSeparator(boolean value) final voidsetUseLocalSetting(boolean value) Methods inherited from class com.stimulsoft.report.components.textFormats.StiFormatService
deserialize, Format, getIsFormatStringFromVariable, getServiceCategory, getServiceType, getState, hashCode, 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
-
StiNumberFormatService
public StiNumberFormatService() -
StiNumberFormatService
public StiNumberFormatService(int negativePattern, String decimalSeparator, int decimalDigits, String groupSeparator, int groupSize, boolean useGroupSeparator, boolean useLocalSetting, String nullDisplay) Creates a new format of the type StiNumberFormatService with specified arguments.- Parameters:
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.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.decimalPlaces- Do not use this argument.
-
StiNumberFormatService
-
-
Method Details
-
FillLocalSetting
-
getServiceName
Gets a service name.- Overrides:
getServiceNamein classStiService
-
getPosition
public int getPosition()- Specified by:
getPositionin classStiFormatService
-
getNullDisplay
Gets or sets string value to show the value null. -
setNullDisplay
-
getNegativePattern
public int getNegativePattern()Gets or sets the format pattern for negative numeric values. -
setNegativePattern
public final void setNegativePattern(int value) -
getDecimalSeparator
Gets or sets the string to use as the decimal separator in currency values. -
setDecimalSeparator
-
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
Gets or sets the string that separates groups of digits to the left of the decimal in currency values. -
setGroupSeparator
-
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
Gets or sets string of formatting.- Overrides:
getStringFormatin classStiFormatService
-
setStringFormat
- Overrides:
setStringFormatin classStiFormatService
-
getSample
Gets value to show a sample of formatting.- Specified by:
getSamplein classStiFormatService
-
getNativeFormatString
Returns native format string.- Overrides:
getNativeFormatStringin classStiFormatService
-
equals
- Overrides:
equalsin classStiFormatService
-
format
Formats the specified object in order of regulations and returns a string.- Overrides:
formatin classStiFormatService- Parameters:
stringFormat- String of formatting.value- Object for formatting.format- String of formatting.arg- Object for formatting.- Returns:
- Formatted string.
-
getDecimalFormatSymbols
-
SaveToJsonObject
- Specified by:
SaveToJsonObjectin interfaceIStiJsonReportObject- Overrides:
SaveToJsonObjectin classStiFormatService- Throws:
JSONException
-
LoadFromJsonObject
- Specified by:
LoadFromJsonObjectin interfaceIStiJsonReportObject- Overrides:
LoadFromJsonObjectin classStiFormatService- Throws:
JSONException
-