|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.beans.FeatureDescriptor
|
+--org.openide.nodes.Node.Property
Description of a Bean property on a node, and operations on it.
You may associate context help with this object, if desired, by setting
a custom property with the name helpID
and value of type String giving a help ID.
Normally this is unnecessary as help for the whole Node will be used by default.
| Constructor Summary | |
Node.Property(Class valueType)
Constructor. |
|
| Method Summary | |
abstract boolean |
canRead()
Test whether the property is readable. |
abstract boolean |
canWrite()
Test whether the property is writable. |
boolean |
equals(Object property)
|
PropertyEditor |
getPropertyEditor()
Get a property editor for this property. |
abstract Object |
getValue()
Get the value. |
Class |
getValueType()
Get the value type. |
int |
hashCode()
|
void |
restoreDefaultValue()
Restore this property to its default value, if supported. |
abstract void |
setValue(Object val)
Set the value. |
boolean |
supportsDefaultValue()
Test whether the property had a default value. |
| Methods inherited from class java.beans.FeatureDescriptor |
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Node.Property(Class valueType)
valueType - type of the property| Method Detail |
public Class getValueType()
Boolean.class means that values are Boolean
objects; to specify the primitive type, use e.g. Boolean.TYPE.
In the latter case, getValue() and setValue(java.lang.Object) will still operate on the wrapper object.public abstract boolean canRead()
true if it is
public abstract Object getValue()
throws IllegalAccessException,
InvocationTargetException
IllegalAccessException - cannot access the called methodInvocationTargetException - an exception during invocationpublic abstract boolean canWrite()
true if the read of the value is supported
public abstract void setValue(Object val)
throws IllegalAccessException,
IllegalArgumentException,
InvocationTargetException
val - the new value of the propertyIllegalAccessException - cannot access the called methodIllegalArgumentException - wrong argumentInvocationTargetException - an exception during invocationpublic boolean supportsDefaultValue()
true if it does (false by default)
public void restoreDefaultValue()
throws IllegalAccessException,
InvocationTargetException
setValue(default).
Note that it is not permitted for this call to throw IllegalArgumentException,
though the other two exceptions from setValue(java.lang.Object) may be passed through.IllegalAccessException - cannot access the called methodInvocationTargetException - an exception during invocationpublic PropertyEditor getPropertyEditor()
PropertyEditorManager.null if there is no editorpublic boolean equals(Object property)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||