|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.gui.Formatter | +--com.ibm.dse.gui.Converter | +--com.ibm.dse.gui.FloatConverter
The FloatConverter class is responsible for Float validation and conversion.
Fields inherited from class com.ibm.dse.gui.Converter |
propertyChange |
Constructor Summary | |
FloatConverter()
This constructor creates a FloatConverter object. |
|
FloatConverter(java.lang.String text,
java.lang.String sep,
char decSep)
This constructor creates a FloatConverter object. |
|
FloatConverter(java.lang.String errorMessage,
java.lang.String sep,
char decSep,
int decimals)
This constructor creates a FloatConverter object. |
|
FloatConverter(java.lang.String errorMessage,
java.lang.String sep,
char decSep,
int decimals,
boolean convertible)
This constructor creates a FloatConverter object. |
Method Summary | |
java.lang.Object |
formatAsConversionType(java.lang.String text)
Converts a String into a Float. |
java.lang.String |
formatFromConversionType(java.lang.Object input)
Converts a Float into a String. |
char |
getDecimalSeparator()
Gets the decimalSeparator property (char) value. |
NumericStringFormat |
getFormat()
Gets the format property (NumericStringFormat) value. |
int |
getMaxNumberOfDecimals()
Gets the maxNumberOfDecimals property (int) value. |
java.lang.String |
getSeparator()
Gets the separator property (java.lang.String) value. |
void |
setDecimalSeparator(char decimalSeparator)
Sets the decimalSeparator property (char) value. |
void |
setFormat(NumericStringFormat value)
Sets the format property (NumericStringFormat) value. |
void |
setMaxNumberOfDecimals(int maxNumberOfDecimals)
Sets the maxNumberOfDecimals property (int) value. |
void |
setSeparator(java.lang.String separator)
Sets the separator property (java.lang.String) value. |
boolean |
validate(java.lang.String userInput)
Returns a boolean that indicates if the validation has been achieved successfully or not. |
boolean |
validateKey(java.lang.String userInput,
java.awt.event.KeyEvent keyEvent)
Returns a boolean that indicates if the validation has been achieved successfully or not for this new key. |
Methods inherited from class com.ibm.dse.gui.Converter |
addPropertyChangeListener,
firePropertyChange,
getErrorMessage,
getIsConvertible,
getIsNull,
getPropertyChange,
removePropertyChangeListener,
setErrorMessage,
setIsConvertible,
setIsNull,
validateWithError |
Methods inherited from class com.ibm.dse.gui.Formatter |
format |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public FloatConverter()
public FloatConverter(java.lang.String text, java.lang.String sep, char decSep)
text
- java.lang.String, the errorMessagesep
- java.lang.String, the thousands separatordecSep
- char, the decimal separatorpublic FloatConverter(java.lang.String errorMessage, java.lang.String sep, char decSep, int decimals)
errorMessage
- java.lang.String, the error messagesep
- java.lang.String, the thousands separatordecSep
- char, the decimal separatordecimals
- int, the number of decimalspublic FloatConverter(java.lang.String errorMessage, java.lang.String sep, char decSep, int decimals, boolean convertible)
errorMessage
- java.lang.String, the error messagesep
- java.lang.String, the thousands separatordecSep
- char, the decimal separatordecimals
- int, the number of decimalsconvertible
- boolean, indicates if it is Euro-EMU convertible or notMethod Detail |
public java.lang.Object formatAsConversionType(java.lang.String text)
text
- java.lang.String, the String to be convertedpublic java.lang.String formatFromConversionType(java.lang.Object input)
input
- Object, the float to be convertedpublic char getDecimalSeparator()
setDecimalSeparator(char)
public NumericStringFormat getFormat()
setFormat(com.ibm.dse.base.NumericStringFormat)
public int getMaxNumberOfDecimals()
setMaxNumberOfDecimals(int)
public java.lang.String getSeparator()
setSeparator(java.lang.String)
public void setDecimalSeparator(char decimalSeparator)
decimalSeparator,
- the new value for the decimalSeparator property.getDecimalSeparator()
public void setFormat(NumericStringFormat value)
format,
- the new value for the format property.getFormat()
public void setMaxNumberOfDecimals(int maxNumberOfDecimals)
maxNumberOfDecimals,
- the new value for the maxNumberOfDecimals property.getMaxNumberOfDecimals()
public void setSeparator(java.lang.String separator)
separator,
- the new value for the separator property.getSeparator()
public boolean validate(java.lang.String userInput)
userInput
- java.lang.String - the string to be validatedpublic boolean validateKey(java.lang.String userInput, java.awt.event.KeyEvent keyEvent)
userInput
- java.lang.String - the string writed.keyEvent
- java.awt.event.KeyEvent - new key.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |