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

IndexedPropertySupport (NetBeans Nodes API) - NetBeans API Javadoc 5.0.0

 

org.openide.nodes
Class IndexedPropertySupport

java.lang.Object
  extended byjava.beans.FeatureDescriptor
      extended byorg.openide.nodes.Node.Property
          extended byorg.openide.nodes.Node.IndexedProperty
              extended byorg.openide.nodes.IndexedPropertySupport

public class IndexedPropertySupport
extends Node.IndexedProperty

Support for indexed properties.

See Also:
Node

Field Summary
protected  Object instance
          Instance of the bean.
 
Constructor Summary
IndexedPropertySupport(Object instance, Class valueType, Class 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.
 Object getIndexedValue(int index)
          Get the value of the property at an index.
 Object getValue()
          Get the value.
 void setDisplayName(String s)
           
 void setIndexedValue(int index, Object val)
          Set the value of the property at an index.
 void setName(String s)
           
 void setShortDescription(String s)
           
 void setValue(Object 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 Object instance
Instance of the bean.

Constructor Detail

IndexedPropertySupport

public IndexedPropertySupport(Object instance,
                              Class valueType,
                              Class 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)

setName

public final void setName(String s)

setShortDescription

public final void setShortDescription(String s)

canRead

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

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

getValue

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

Specified by:
getValue in class Node.Property
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
Returns:
true if the read of the value is supported

setValue

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

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

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
Returns:
true if so

getIndexedValue

public Object 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
Parameters:
index - the index
Returns:
the value at that index
Throws:
InvocationTargetException - an exception during invocation
IllegalArgumentException - wrong argument
IllegalAccessException - cannot access the called method

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
Returns:
true if so

setIndexedValue

public void setIndexedValue(int index,
                            Object 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
Parameters:
index - the index
val - the value to set
Throws:
IllegalArgumentException - wrong argument
IllegalAccessException - cannot access the called method
InvocationTargetException - an exception during invocation

 

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