com.ibm.ulc.ui.dataTypes
Class UINumberFormatConverter
java.lang.Object
|
+--com.ibm.ulc.ui.dataTypes.UINumberFormatConverter
- Direct Known Subclasses:
- UIDoubleNumberFormatConverter, UIIntegerNumberFormatConverter
- public class UINumberFormatConverter
- extends java.lang.Object
- implements IStringConverter
Field Summary |
protected java.text.NumberFormat |
fFormat
The format object that actually does the work |
Method Summary |
java.lang.String |
convertToEditString(java.lang.Object object)
Answer a String representation of the parameter suitable for editing
(e.g. |
java.lang.Object |
convertToObject(java.lang.String string)
convertToObject method comment. |
java.lang.String |
convertToString(java.lang.Object object)
convertToString method comment. |
static UINumberFormatConverter |
getInstance(boolean isInteger)
Answer an instance suitable for int, if isInteger == true,
for double, otherwise
Creation date: (23-Nov-99 5:43:33 PM) |
void |
setGroupingUsed(boolean useGrouping)
Set whether or not grouping will be used in this format. |
void |
setMaximumFractionDigits(int newValue)
Sets the maximum number of digits allowed in the fraction portion of a
number. |
void |
setMinimumFractionDigits(int newValue)
Sets the minimum number of digits allowed in the fraction portion of a
number. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
fFormat
protected java.text.NumberFormat fFormat
- The format object that actually does the work
UINumberFormatConverter
public UINumberFormatConverter()
- UINumberFormatConverter constructor comment.
convertToEditString
public java.lang.String convertToEditString(java.lang.Object object)
- Answer a String representation of the parameter suitable for editing
(e.g. increased precision).
- Specified by:
- convertToEditString in interface IStringConverter
- Tags copied from interface: IStringConverter
- Parameters:
object
- java.lang.Object- Returns:
- java.lang.Object
convertToObject
public java.lang.Object convertToObject(java.lang.String string)
throws DataTypeConversionException
- convertToObject method comment.
- Specified by:
- convertToObject in interface IStringConverter
- Tags copied from interface: IStringConverter
- Parameters:
string
- java.lang.String- Returns:
- java.lang.Object
- Throws:
- DataTypeConversionException - The exception description.
convertToString
public java.lang.String convertToString(java.lang.Object object)
- convertToString method comment.
- Specified by:
- convertToString in interface IStringConverter
- Tags copied from interface: IStringConverter
- Parameters:
object
- java.lang.Object- Returns:
- java.lang.Object
getInstance
public static UINumberFormatConverter getInstance(boolean isInteger)
- Answer an instance suitable for int, if isInteger == true,
for double, otherwise
Creation date: (23-Nov-99 5:43:33 PM)
- Parameters:
isInteger
- boolean- Returns:
- com.ibm.ulc.ui.dataTypes.UINumberFormatConverter
setGroupingUsed
public void setGroupingUsed(boolean useGrouping)
- Set whether or not grouping will be used in this format.
(see NumberFormat)
Creation date: (23-Nov-99 2:49:09 PM)
- Parameters:
useGrouping
- boolean
setMaximumFractionDigits
public void setMaximumFractionDigits(int newValue)
- Sets the maximum number of digits allowed in the fraction portion of a
number. maximumFractionDigits must be >= minimumFractionDigits.
(see NumberFormat)
Creation date: (23-Nov-99 2:49:09 PM)
- Parameters:
newValue
- int
setMinimumFractionDigits
public void setMinimumFractionDigits(int newValue)
- Sets the minimum number of digits allowed in the fraction portion of a
number. minimumFractionDigits must be <= maximumFractionDigits.
(see NumberFormat)
Creation date: (23-Nov-99 2:49:09 PM)
- Parameters:
newValue
- int