com.stimulsoft.report.components.textFormats
Class StiPercentageFormatService

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

public class StiPercentageFormatService
extends StiCurrencyFormatService

Describes a service for the text formatting as percentage values.


Field Summary
 
Fields inherited from class com.stimulsoft.base.services.StiService
properties
 
Fields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT
 
Constructor Summary
StiPercentageFormatService()
           
StiPercentageFormatService(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)
           
StiPercentageFormatService(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 StiPercentageFormatService with specified parameters.
 
Method Summary
 java.lang.String format(java.lang.String stringFormat, java.lang.Object value)
          Formats the specified object in order of regulations and returns a string.
 java.lang.String getNativeFormatString()
          Returns native format string.
 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.
 JSONObject SaveToJsonObject(StiJsonSaveMode mode)
           
 void setStringFormat(java.lang.String value)
           
 
Methods inherited from class com.stimulsoft.report.components.textFormats.StiCurrencyFormatService
equals, getPositivePattern, getSymbol, hashCode, LoadFromJsonObject, setPositivePattern, setSymbol
 
Methods inherited from class com.stimulsoft.report.components.textFormats.StiNumberFormatService
FillLocalSetting, getDecimalDigits, getDecimalFormatSymbols, getDecimalSeparator, getGroupSeparator, getGroupSize, getNegativePattern, 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
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StiPercentageFormatService

public StiPercentageFormatService()

StiPercentageFormatService

public StiPercentageFormatService(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 StiPercentageFormatService with specified parameters.

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 synbol.
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.

StiPercentageFormatService

public StiPercentageFormatService(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)
Method Detail

getServiceName

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

Overrides:
getServiceName in class StiCurrencyFormatService

getPosition

public int getPosition()
Overrides:
getPosition in class StiCurrencyFormatService

getStringFormat

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

Overrides:
getStringFormat in class StiCurrencyFormatService

setStringFormat

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

getSample

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

Overrides:
getSample in class StiCurrencyFormatService

getNativeFormatString

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

Overrides:
getNativeFormatString in class StiCurrencyFormatService

format

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

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


Copyright © 2018 Stimulsoft. All Rights Reserved.