|
org.openide.nodes 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.beans.FeatureDescriptor
org.openide.nodes.Node.Property<T>
org.openide.nodes.Node.IndexedProperty<T,E>
org.openide.nodes.IndexedPropertySupport<T,E>
public class IndexedPropertySupport<T,E>
Support for indexed properties.
Field Summary | |
---|---|
protected T |
instance
Instance of the bean. |
Constructor Summary | |
---|---|
IndexedPropertySupport(T instance,
Class<T> valueType,
Class<E> elementType,
Method getter,
Method setter,
Method indexedGetter,
Method indexedSetter)
Constructor. |
Method Summary | |
---|---|
boolean |
canIndexedRead()
Test whether the property is readable by index. |
boolean |
canIndexedWrite()
Test whether the property is writable by index. |
boolean |
canRead()
Test whether the property is readable. |
boolean |
canWrite()
Test whether the property is writable. |
E |
getIndexedValue(int index)
Get the value of the property at an index. |
T |
getValue()
Get the value. |
void |
setDisplayName(String s)
|
void |
setIndexedValue(int index,
E val)
Set the value of the property at an index. |
void |
setName(String s)
|
void |
setShortDescription(String s)
|
void |
setValue(T val)
Set the value. |
Methods inherited from class org.openide.nodes.Node.IndexedProperty |
---|
equals, getElementType, getIndexedPropertyEditor, hashCode |
Methods inherited from class org.openide.nodes.Node.Property |
---|
getHtmlDisplayName, getPropertyEditor, getValueType, isDefaultValue, restoreDefaultValue, supportsDefaultValue |
Methods inherited from class java.beans.FeatureDescriptor |
---|
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setExpert, setHidden, setPreferred, setValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected T instance
Constructor Detail |
---|
public IndexedPropertySupport(T instance, Class<T> valueType, Class<E> elementType, Method getter, Method setter, Method indexedGetter, Method indexedSetter)
instance
- the bean for which these properties existvalueType
- type of the entire propertyelementType
- type of one element of the propertygetter
- get method for the entire propertysetter
- set method for the entire propertyindexedGetter
- get method for one elementindexedSetter
- set method for one elementMethod Detail |
---|
public final void setDisplayName(String s)
setDisplayName
in class FeatureDescriptor
public final void setName(String s)
setName
in class FeatureDescriptor
public final void setShortDescription(String s)
setShortDescription
in class FeatureDescriptor
public boolean canRead()
Node.Property
canRead
in class Node.Property<T>
true
if it ispublic T getValue() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
Node.Property
getValue
in class Node.Property<T>
IllegalAccessException
- cannot access the called method
InvocationTargetException
- an exception during invocation
IllegalArgumentException
public boolean canWrite()
Node.Property
canWrite
in class Node.Property<T>
true
if the read of the value is supportedpublic void setValue(T val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
Node.Property
setValue
in class Node.Property<T>
val
- the new value of the property
IllegalAccessException
- cannot access the called method
IllegalArgumentException
- wrong argument
InvocationTargetException
- an exception during invocationpublic boolean canIndexedRead()
Node.IndexedProperty
canIndexedRead
in class Node.IndexedProperty<T,E>
true
if sopublic E getIndexedValue(int index) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
Node.IndexedProperty
getIndexedValue
in class Node.IndexedProperty<T,E>
index
- the index
IllegalAccessException
- cannot access the called method
IllegalArgumentException
- wrong argument
InvocationTargetException
- an exception during invocationpublic boolean canIndexedWrite()
Node.IndexedProperty
canIndexedWrite
in class Node.IndexedProperty<T,E>
true
if sopublic void setIndexedValue(int index, E val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
Node.IndexedProperty
setIndexedValue
in class Node.IndexedProperty<T,E>
index
- the indexval
- the value to set
IllegalAccessException
- cannot access the called method
IllegalArgumentException
- wrong argument
InvocationTargetException
- an exception during invocation
|
org.openide.nodes 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |