org.netbeans.beaninfo.editors
Class URLEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.netbeans.beaninfo.editors.URLEditor
- All Implemented Interfaces:
- PropertyEditor, XMLPropertyEditor
public class URLEditor
- extends PropertyEditorSupport
- implements XMLPropertyEditor
A property editor for java.net.URL class.
| Methods inherited from class java.beans.PropertyEditorSupport |
addPropertyChangeListener, firePropertyChange, getCustomEditor, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XML_URL
public static final String XML_URL
- See Also:
- Constant Field Values
ATTR_VALUE
public static final String ATTR_VALUE
- See Also:
- Constant Field Values
URLEditor
public URLEditor()
setAsText
public void setAsText(String s)
- sets new value
- Specified by:
setAsText in interface PropertyEditor- Overrides:
setAsText in class PropertyEditorSupport
getAsText
public String getAsText()
- Specified by:
getAsText in interface PropertyEditor- Overrides:
getAsText in class PropertyEditorSupport
- Returns:
- the current value as String
getJavaInitializationString
public String getJavaInitializationString()
- Specified by:
getJavaInitializationString in interface PropertyEditor- Overrides:
getJavaInitializationString in class PropertyEditorSupport
supportsCustomEditor
public boolean supportsCustomEditor()
- Specified by:
supportsCustomEditor in interface PropertyEditor- Overrides:
supportsCustomEditor in class PropertyEditorSupport
readFromXML
public void readFromXML(Node element)
throws IOException
- Called to load property value from specified XML subtree. If succesfully loaded,
the value should be available via the getValue method.
An IOException should be thrown when the value cannot be restored from the specified XML element
- Specified by:
readFromXML in interface XMLPropertyEditor
- Parameters:
element - the XML DOM element representing a subtree of XML from which the value should be loaded
- Throws:
IOException - thrown when the value cannot be restored from the specified XML element
storeToXML
public Node storeToXML(Document doc)
- Called to store current property value into XML subtree. The property value should be set using the
setValue method prior to calling this method.
- Specified by:
storeToXML in interface XMLPropertyEditor
- Parameters:
doc - The XML document to store the XML in - should be used for creating nodes only
- Returns:
- the XML DOM element representing a subtree of XML from which the value should be loaded