站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

XMLPropertyEditor (NetBeans Explorer API) - NetBeans API Javadoc 5.0.0

 

org.openide.explorer.propertysheet.editors
Interface XMLPropertyEditor

All Superinterfaces:
PropertyEditor

public interface XMLPropertyEditor
extends PropertyEditor

An interface to be implemented by property editors which want to provide a load/store of property values in human-readable XML. The XML persistence is currently used by the form editor module for storage of modified property values.


Method Summary
 void readFromXML(Node element)
          Called to load property value from specified XML subtree.
 Node storeToXML(Document doc)
          Called to store current property value into XML subtree.
 
Methods inherited from interface java.beans.PropertyEditor
addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText, setValue, supportsCustomEditor
 

Method Detail

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

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.

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

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.