Package org.esa.snap.ui
Class DecimalFormatter
- java.lang.Object
-
- javax.swing.JFormattedTextField.AbstractFormatter
-
- org.esa.snap.ui.DecimalFormatter
-
- All Implemented Interfaces:
Serializable
public class DecimalFormatter extends JFormattedTextField.AbstractFormatter
A formatter to be used for decimal number in aJFormattedTextField
-
-
Constructor Summary
Constructors Constructor Description DecimalFormatter(String pattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
stringToValue(String text)
String
valueToString(Object value)
-
Methods inherited from class javax.swing.JFormattedTextField.AbstractFormatter
clone, getActions, getDocumentFilter, getFormattedTextField, getNavigationFilter, install, invalidEdit, setEditValid, uninstall
-
-
-
-
Constructor Detail
-
DecimalFormatter
public DecimalFormatter(String pattern)
-
-
Method Detail
-
stringToValue
public Object stringToValue(String text) throws ParseException
- Specified by:
stringToValue
in classJFormattedTextField.AbstractFormatter
- Throws:
ParseException
-
valueToString
public String valueToString(Object value) throws ParseException
- Specified by:
valueToString
in classJFormattedTextField.AbstractFormatter
- Throws:
ParseException
-
-