MultiLineTextPropertyEditor.MutiLineTextFormatter Class
- protected static class MultiLineTextPropertyEditor.MutiLineTextFormatter
extends JFormattedTextField.AbstractFormatter
Formatter used to generate the text displayed in the property view.
Provides a read-only "preview" of the first non-whitespace line of
the property's value.
-
Hierarchy
-
Object
JFormattedTextField.AbstractFormatter
MultiLineTextPropertyEditor.MutiLineTextFormatter
-
All Implemented Interfaces
-
Serializable
-
Enclosing class
-
MultiLineTextPropertyEditor
public Object |
-
stringToValue (String string)
- Converts the passed in String into an instance of
getValueClass by way of the constructor that
takes a String argument.
|
public String |
-
valueToString (Object value)
- Converts the passed in Object into a String by way of the
toString method.
|
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiLineTextPropertyEditor.MutiLineTextFormatter
protected MultiLineTextPropertyEditor.MutiLineTextFormatter()
stringToValue(String) Method
public Object
stringToValue(String
string)
throws ParseException
Converts the passed in String into an instance of
getValueClass
by way of the constructor that
takes a String argument. If getValueClass
returns null, the Class of the current value in the
JFormattedTextField
will be used. If this is null, a
String will be returned. If the constructor thows an exception, a
ParseException
will be thrown. If there is no single
argument String constructor, string
will be returned.
-
Overrides
-
JFormattedTextField.AbstractFormatter.stringToValue(String)
Parameters
-
string
- String to convert
Returns
- Object representation of text
Exceptions
-
ParseException
- if there is an error in the conversion
valueToString(Object) Method
public String
valueToString(Object
value)
throws ParseException
Converts the passed in Object into a String by way of the
toString
method.
-
Overrides
-
JFormattedTextField.AbstractFormatter.valueToString(Object)
Parameters
-
value
- Value to convert
Returns
- String representation of value
Exceptions
-
ParseException
- if there is an error in the conversion