org.netbeans.core/2 3.32

org.netbeans.beaninfo.editors
Class StringArrayEditor

java.lang.Object
  extended by org.netbeans.beaninfo.editors.StringArrayEditor
All Implemented Interfaces:
PropertyEditor, StringArrayCustomizable, XMLPropertyEditor, ExPropertyEditor

public class StringArrayEditor
extends Object
implements XMLPropertyEditor, StringArrayCustomizable, ExPropertyEditor

A property editor for array of Strings.


Field Summary
 
Fields inherited from interface org.openide.explorer.propertysheet.ExPropertyEditor
PROP_VALUE_VALID, PROPERTY_HELP_ID
 
Constructor Summary
StringArrayEditor()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
           
 void attachEnv(PropertyEnv env)
           
 String getAsText()
           
 Component getCustomEditor()
           
 String getJavaInitializationString()
           
 String[] getStringArray()
          Used to acquire the current value from the PropertyEditor
protected  String getStrings(boolean quoted)
           
 String[] getTags()
           
 Object getValue()
           
 boolean isPaintable()
           
 void paintValue(Graphics g, Rectangle rectangle)
           
 void readFromXML(Node element)
          Called to load property value from specified XML subtree.
 void removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
           
 void setAsText(String text)
           
 void setStringArray(String[] value)
          Used to modify the current value in the PropertyEditor
 void setValue(Object value)
           
 Node storeToXML(Document doc)
          Called to store current property value into XML subtree.
 boolean supportsCustomEditor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringArrayEditor

public StringArrayEditor()
Method Detail

getValue

public Object getValue()
Specified by:
getValue in interface PropertyEditor

setValue

public void setValue(Object value)
Specified by:
setValue in interface PropertyEditor

getStringArray

public String[] getStringArray()
Used to acquire the current value from the PropertyEditor

Specified by:
getStringArray in interface StringArrayCustomizable
Returns:
the current value of the property

setStringArray

public void setStringArray(String[] value)
Used to modify the current value in the PropertyEditor

Specified by:
setStringArray in interface StringArrayCustomizable
Parameters:
value - the new value of the property

getStrings

protected final String getStrings(boolean quoted)

getAsText

public String getAsText()
Specified by:
getAsText in interface PropertyEditor

setAsText

public void setAsText(String text)
Specified by:
setAsText in interface PropertyEditor

getJavaInitializationString

public String getJavaInitializationString()
Specified by:
getJavaInitializationString in interface PropertyEditor

getTags

public String[] getTags()
Specified by:
getTags in interface PropertyEditor

isPaintable

public boolean isPaintable()
Specified by:
isPaintable in interface PropertyEditor

paintValue

public void paintValue(Graphics g,
                       Rectangle rectangle)
Specified by:
paintValue in interface PropertyEditor

supportsCustomEditor

public boolean supportsCustomEditor()
Specified by:
supportsCustomEditor in interface PropertyEditor

getCustomEditor

public Component getCustomEditor()
Specified by:
getCustomEditor in interface PropertyEditor

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
Specified by:
addPropertyChangeListener in interface PropertyEditor

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
Specified by:
removePropertyChangeListener in interface PropertyEditor

storeToXML

public Node storeToXML(Document doc)
Called to store current property value into XML subtree.

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

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 getValue(). 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

attachEnv

public void attachEnv(PropertyEnv env)
Specified by:
attachEnv in interface ExPropertyEditor

org.netbeans.core/2 3.32

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