NetCharts Pro

netcharts.pro.common
Class NFNumberFormat

java.lang.Object
  extended by netcharts.pro.common.NFBaseClass
      extended by netcharts.pro.common.NFNumberFormat
All Implemented Interfaces:
java.lang.Cloneable, NFCDLGenerator

public class NFNumberFormat
extends NFBaseClass
implements NFCDLGenerator

The NFNumberFormat object provides the ability to change the display of digits to use different symbols to delimit decimal values and grouping symbols. By default, all numbers in the charts are displayed as nnn,nnn.rrr where n represents the whole number and rrr represents the remainder.


Constructor Summary
NFNumberFormat()
          Constructs a default number format
NFNumberFormat(java.lang.String decimalSymbol, java.lang.String groupSymbol, int groupSize)
          Constructs a number format with the given decimal symbol, group symbol, and groupSize.
 
Method Summary
 java.lang.String getCDL()
          Generate CDL parameters representing this region
 java.lang.String getDecimalSymbol()
          Get the decimal symbol
 int getGroupSize()
          Get the group size
 java.lang.String getGroupSymbol()
          Get the group symbol
 void setCDL(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setDecimalSymbol(java.lang.String decimalSymbol)
          Set the decimal symbol
 void setGroupSize(int groupSize)
          Set the group size
 void setGroupSymbol(java.lang.String groupSymbol)
          Set the group symbol
 java.lang.String toString()
          Returns a new String object representing this number format.
 
Methods inherited from class netcharts.pro.common.NFBaseClass
clone, getModified, getUserObject, setModified, setUserObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NFNumberFormat

public NFNumberFormat()
Constructs a default number format


NFNumberFormat

public NFNumberFormat(java.lang.String decimalSymbol,
                      java.lang.String groupSymbol,
                      int groupSize)
Constructs a number format with the given decimal symbol, group symbol, and groupSize.

Parameters:
decimalSymbol - The characters to delimit whole and fractional parts of a number.
groupSymbol - The characters to delimit groups of digits
groupSize - Number of digits between groupSymbols.
Method Detail

setDecimalSymbol

public void setDecimalSymbol(java.lang.String decimalSymbol)
Set the decimal symbol

Parameters:
decimalSymbol - The characters to delimit whole and fractional parts of a number.

getDecimalSymbol

public java.lang.String getDecimalSymbol()
Get the decimal symbol

Returns:
The characters to delimit whole and fractional parts of a number or "." if not set.

setGroupSymbol

public void setGroupSymbol(java.lang.String groupSymbol)
Set the group symbol

Parameters:
groupSymbol - The characters to delimit groups of digits

getGroupSymbol

public java.lang.String getGroupSymbol()
Get the group symbol

Returns:
characters to delimit groups of digits or "," if not set.

setGroupSize

public void setGroupSize(int groupSize)
Set the group size

Parameters:
groupSize - Number of digits between groupSymbols.

getGroupSize

public int getGroupSize()
Get the group size

Returns:
number of digits between groupSymbols or 3 if not set.

setCDL

public void setCDL(java.lang.String cdl)
Configures this object from a CDL parameter representation.

Specified by:
setCDL in interface NFCDLGenerator
Parameters:
cdl - CDL in the form: ("decimalSymbol","groupSymbol", groupSize)

toString

public java.lang.String toString()
Returns a new String object representing this number format.

Specified by:
toString in interface NFCDLGenerator
Overrides:
toString in class java.lang.Object
Returns:
A new String object in the same form as that given by getCDL().

getCDL

public java.lang.String getCDL()
Generate CDL parameters representing this region

Specified by:
getCDL in interface NFCDLGenerator
Returns:
CDL in the form: ("decimalSymbol","groupSymbol",groupSize)

NetCharts Pro


Visual Mining, Inc.
2099 Gaither Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2011
All Rights Reserved.

NetCharts Pro TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Jun 28, 2011