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

IndexedPropertySupport (Nodes API) - NetBeans API Javadoc (Current Development Version)

org.openide.nodes 7.0

org.openide.nodes
Class IndexedPropertySupport<T,E>

java.lang.Object
  extended by java.beans.FeatureDescriptor
      extended by org.openide.nodes.Node.Property<T>
          extended by org.openide.nodes.Node.IndexedProperty<T,E>
              extended by org.openide.nodes.IndexedPropertySupport<T,E>

public class IndexedPropertySupport<T,E>
extends Node.IndexedProperty<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

instance

protected T instance
Instance of the bean.

Constructor Detail

IndexedPropertySupport

public IndexedPropertySupport(T instance,
                              Class<T> valueType,
                              Class<E> elementType,
                              Method getter,
                              Method setter,
                              Method indexedGetter,
                              Method indexedSetter)
Constructor.

Parameters:
instance - the bean for which these properties exist
valueType - type of the entire property
elementType - type of one element of the property
getter - get method for the entire property
setter - set method for the entire property
indexedGetter - get method for one element
indexedSetter - set method for one element
Method Detail

setDisplayName

public final void setDisplayName(String s)
Overrides:
setDisplayName in class FeatureDescriptor

setName

public final void setName(String s)
Overrides:
setName in class FeatureDescriptor

setShortDescription

public final void setShortDescription(String s)
Overrides:
setShortDescription in class FeatureDescriptor

canRead

public boolean canRead()
Description copied from class: Node.Property
Test whether the property is readable.

Specified by:
canRead in class Node.Property<T>
Returns:
true if it is

getValue

public T getValue()
           throws IllegalAccessException,
                  IllegalArgumentException,
                  InvocationTargetException
Description copied from class: Node.Property
Get the value.

Specified by:
getValue in class Node.Property<T>
Returns:
the value of the property
Throws:
IllegalAccessException - cannot access the called method
InvocationTargetException - an exception during invocation
IllegalArgumentException

canWrite

public boolean canWrite()
Description copied from class: Node.Property
Test whether the property is writable.

Specified by:
canWrite in class Node.Property<T>
Returns:
true if the read of the value is supported

setValue

public void setValue(T val)
              throws IllegalAccessException,
                     IllegalArgumentException,
                     InvocationTargetException
Description copied from class: Node.Property
Set the value.

Specified by:
setValue in class Node.Property<T>
Parameters:
val - the new value of the property
Throws:
IllegalAccessException - cannot access the called method
IllegalArgumentException - wrong argument
InvocationTargetException - an exception during invocation

canIndexedRead

public boolean canIndexedRead()
Description copied from class: Node.IndexedProperty
Test whether the property is readable by index.

Specified by:
canIndexedRead in class Node.IndexedProperty<T,E>
Returns:
true if so

getIndexedValue

public E getIndexedValue(int index)
                  throws IllegalAccessException,
                         IllegalArgumentException,
                         InvocationTargetException
Description copied from class: Node.IndexedProperty
Get the value of the property at an index.

Specified by:
getIndexedValue in class Node.IndexedProperty<T,E>
Parameters:
index - the index
Returns:
the value at that index
Throws:
IllegalAccessException - cannot access the called method
IllegalArgumentException - wrong argument
InvocationTargetException - an exception during invocation

canIndexedWrite

public boolean canIndexedWrite()
Description copied from class: Node.IndexedProperty
Test whether the property is writable by index.

Specified by:
canIndexedWrite in class Node.IndexedProperty<T,E>
Returns:
true if so

setIndexedValue

public void setIndexedValue(int index,
                            E val)
                     throws IllegalAccessException,
                            IllegalArgumentException,
                            InvocationTargetException
Description copied from class: Node.IndexedProperty
Set the value of the property at an index.

Specified by:
setIndexedValue in class Node.IndexedProperty<T,E>
Parameters:
index - the index
val - the value to set
Throws:
IllegalAccessException - cannot access the called method
IllegalArgumentException - wrong argument
InvocationTargetException - an exception during invocation

org.openide.nodes 7.0

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