org.netbeans.core/2 3.32

org.netbeans.beaninfo.editors
Class URLEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by 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.


Field Summary
static String ATTR_VALUE
           
static String XML_URL
           
 
Constructor Summary
URLEditor()
           
 
Method Summary
 String getAsText()
           
 String getJavaInitializationString()
           
 void readFromXML(Node element)
          Called to load property value from specified XML subtree.
 void setAsText(String s)
          sets new value
 Node storeToXML(Document doc)
          Called to store current property value into XML subtree.
 boolean supportsCustomEditor()
           
 
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
 
Methods inherited from interface java.beans.PropertyEditor
addPropertyChangeListener, getCustomEditor, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setValue
 

Field Detail

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
Constructor Detail

URLEditor

public URLEditor()
Method Detail

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

org.netbeans.core/2 3.32

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.