public static class UrlTextField.UrlFormatter
extends javax.swing.text.DefaultFormatter
Constructor and Description |
---|
UrlFormatter(boolean allowEmpty)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
UrlTextField.UrlFormatter |
clone()
Clone.
|
java.lang.Object |
stringToValue(java.lang.String text)
Parses
text returning an arbitrary Object. |
java.lang.String |
valueToString(java.lang.Object value)
Returns the string value to display for
value . |
getAllowsInvalid, getCommitsOnValidEdit, getDocumentFilter, getNavigationFilter, getOverwriteMode, getValueClass, install, setAllowsInvalid, setCommitsOnValidEdit, setOverwriteMode, setValueClass
public UrlFormatter(boolean allowEmpty)
allowEmpty
- allow empty text representing a null
URL?public java.lang.Object stringToValue(java.lang.String text) throws java.text.ParseException
text
returning an arbitrary Object. Some
formatters may return null.stringToValue
in class javax.swing.text.DefaultFormatter
text
- String to convertjava.text.ParseException
- if there is an error in the conversionpublic java.lang.String valueToString(java.lang.Object value) throws java.text.ParseException
value
.valueToString
in class javax.swing.text.DefaultFormatter
value
- Value to convertjava.text.ParseException
- if there is an error in the conversionpublic UrlTextField.UrlFormatter clone() throws java.lang.CloneNotSupportedException
clone
in class javax.swing.text.DefaultFormatter
java.lang.CloneNotSupportedException
- on cloning errors