ElegantJCharts Java API Specification v2.0

com.elegantj.graphx
Class ValueFormat

java.lang.Object
  |
  +--com.elegantj.graphx.ValueFormat

public class ValueFormat
extends java.lang.Object

Class provided value formating according its object type(i.e Date, Number, String)


Field Summary
static int ABSOLUTE_NEG_VALUE
          Specifies the Constant for Absolute Negative value representation i.e: if value -1234 then value representation 1234
static int DEFAULT_NEG_VALUE
          Specifies the Constant for Default Negative value representation i.e: if value -1234 then value representation -1234
static int PARA_NEG_VALUE
          Specifies the Constant for Parenthesis Negative value representation i.e: if value -1234 then value representation (1234)
 
Constructor Summary
ValueFormat(java.lang.String formatStr)
          Create instance of ValueFormat class
ValueFormat(java.lang.String formatStr, int no)
          Create instance of ValueFormat class
 
Method Summary
 java.lang.String getNegValRepString(int repType, java.lang.String inString)
          This method gets -ve value rep
 java.lang.String getString(java.lang.Object obj)
          Return Format string according to its object type and formatting text
 java.lang.String getValueFormat()
          get Graph Value Format
 void setCommaFormat(boolean isComma)
          set Value as comma Formatted
 void setMaximumChar(int no)
          set Maximum Number of character while formatting String type
 void setMaximumFractionDigit(int no)
          set Maximum Number of Fraction digit after decimal
 void setNegativeValRep(int no)
          set Maximum Number of Fraction digit after decimal
 void setSuffixUnit(boolean isSuffix)
          set unit at suffix to value
 void setUnitText(java.lang.String text)
          set unit text
 void setValueFormat(java.lang.String text)
          set Graph Value Format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NEG_VALUE

public static final int DEFAULT_NEG_VALUE
Specifies the Constant for Default Negative value representation i.e: if value -1234 then value representation -1234

See Also:
Constant Field Values

ABSOLUTE_NEG_VALUE

public static final int ABSOLUTE_NEG_VALUE
Specifies the Constant for Absolute Negative value representation i.e: if value -1234 then value representation 1234

See Also:
Constant Field Values

PARA_NEG_VALUE

public static final int PARA_NEG_VALUE
Specifies the Constant for Parenthesis Negative value representation i.e: if value -1234 then value representation (1234)

See Also:
Constant Field Values
Constructor Detail

ValueFormat

public ValueFormat(java.lang.String formatStr)
Create instance of ValueFormat class


ValueFormat

public ValueFormat(java.lang.String formatStr,
                   int no)
Create instance of ValueFormat class

Method Detail

setValueFormat

public void setValueFormat(java.lang.String text)
set Graph Value Format

Parameters:
text - Specifies the Value Formatting string

getValueFormat

public java.lang.String getValueFormat()
get Graph Value Format

Returns:
String Value Formatting string

setMaximumChar

public void setMaximumChar(int no)
set Maximum Number of character while formatting String type

Parameters:
no - Specifies the Number of character

setMaximumFractionDigit

public void setMaximumFractionDigit(int no)
set Maximum Number of Fraction digit after decimal

Parameters:
no - Specifies the Number of Fraction digit after decimal

setCommaFormat

public void setCommaFormat(boolean isComma)
set Value as comma Formatted

Parameters:
isComma - boolean specifies Value as comma Formatted

setSuffixUnit

public void setSuffixUnit(boolean isSuffix)
set unit at suffix to value

Parameters:
isSuffix - boolean specifies unit at suffix to value

setUnitText

public void setUnitText(java.lang.String text)
set unit text

Parameters:
text - string specifies unit text

setNegativeValRep

public void setNegativeValRep(int no)
set Maximum Number of Fraction digit after decimal

Parameters:
no - Specifies the Number of Fraction digit after decimal

getString

public java.lang.String getString(java.lang.Object obj)
Return Format string according to its object type and formatting text

Returns:
String Formatted Value

getNegValRepString

public java.lang.String getNegValRepString(int repType,
                                           java.lang.String inString)
This method gets -ve value rep


ElegantJCharts Java API Specification v2.0

For any feedback, suggestion, or query, please revert back to support@elegantcharts.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.