| java.lang.Object java.beans.PropertyEditorSupport org.netbeans.beaninfo.editors.ArrayOfIntSupport
All known Subclasses: org.netbeans.beaninfo.editors.DimensionEditor, org.netbeans.beaninfo.editors.InsetsEditor, org.netbeans.beaninfo.editors.PointEditor, org.netbeans.beaninfo.editors.RectangleEditor,
ArrayOfIntSupport | abstract class ArrayOfIntSupport extends java.beans.PropertyEditorSupport implements XMLPropertyEditor,ExPropertyEditor(Code) | | Support for property editors for several integers.
for example: Point - [2,4], Insets [2,3,4,4],...
author: Petr Hamernik version: 0.14, Jul 20, 1998 |
Constructor Summary | |
public | ArrayOfIntSupport(String className, int count) constructs new property editor.
Parameters: className - Name of the class which is this editor for. |
env | PropertyEnv env(Code) | | associated env, accessible by package private subclasses
|
ArrayOfIntSupport | public ArrayOfIntSupport(String className, int count)(Code) | | constructs new property editor.
Parameters: className - Name of the class which is this editor for. (e.g. "java.awt.Point") Parameters: count - Length of the array of int |
attachEnv | public void attachEnv(PropertyEnv env)(Code) | | |
getAsText | public String getAsText()(Code) | | The property value as a human editable string. Returns null if the value can't be expressed as an editable string. If a non-null value is returned, then the PropertyEditor shouldbe prepared to parse that string back in setAsText(). |
getHintFormat | String getHintFormat()(Code) | | the format info for the user. Can be rewritten in subclasses. |
getJavaInitializationString | public String getJavaInitializationString()(Code) | | This method is intended for use when generating Java code to set
the value of the property. It should return a fragment of Java code
that can be used to initialize a variable with the current property
value.
Example results are "2", "new Color(127,127,34)", "Color.orange", etc.
A fragment of Java code representing an initializer for thecurrent value. |
getValues | abstract int[] getValues()(Code) | | Abstract method for translating the value from getValue() method to array of int.
|
getXMLValueTag | abstract protected String getXMLValueTag()(Code) | | Provides name of XML tag to use for XML persistence of the property value
|
readFromXML | public void readFromXML(org.w3c.dom.Node element) throws java.io.IOException(Code) | | 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 exception: IOException - thrown when the value cannot be restored from the specified XML element |
setAsText | public void setAsText(String text) throws IllegalArgumentException(Code) | | Set the property value by parsing a given String. May raise
java.lang.IllegalArgumentException if either the String is
badly formatted or if this kind of property can't be expressed
as text.
Parameters: text - The string to be parsed. |
setValues | abstract void setValues(int[] val)(Code) | | Abstract method for translating the array of int to value
which is set to method setValue(XXX)
|
storeToXML | public org.w3c.dom.Node storeToXML(org.w3c.dom.Document doc)(Code) | | 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 the XML DOM element representing a subtree of XML from which the value should be loaded |
|
|