org.openide.nodes
Class IndexedPropertySupport

java.lang.Object
  |
  +--java.beans.FeatureDescriptor
        |
        +--org.openide.nodes.Node.Property
              |
              +--org.openide.nodes.Node.IndexedProperty
                    |
                    +--org.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
getElementType, getIndexedPropertyEditor
 
Methods inherited from class org.openide.nodes.Node.Property
equals, getPropertyEditor, getValueType, hashCode, 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)
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.
Overrides:
canRead in class Node.Property
Following copied from class: org.openide.nodes.Node.Property
Returns:
true if it is

getValue

public Object getValue()
                throws IllegalAccessException,
                       IllegalArgumentException,
                       InvocationTargetException
Description copied from class: Node.Property
Get the value.
Overrides:
getValue in class Node.Property
Following copied from class: org.openide.nodes.Node.Property
Returns:
the value of the property
Throws:
IllegalAccessException - cannot access the called method
InvocationTargetException - an exception during invocation

canWrite

public boolean canWrite()
Description copied from class: Node.Property
Test whether the property is writable.
Overrides:
canWrite in class Node.Property
Following copied from class: org.openide.nodes.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.
Overrides:
setValue in class Node.Property
Following copied from class: org.openide.nodes.Node.Property
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.
Overrides:
canIndexedRead in class Node.IndexedProperty
Following copied from class: org.openide.nodes.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.
Overrides:
getIndexedValue in class Node.IndexedProperty
Following copied from class: org.openide.nodes.Node.IndexedProperty
Parameters:
indx - 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.
Overrides:
canIndexedWrite in class Node.IndexedProperty
Following copied from class: org.openide.nodes.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.
Overrides:
setIndexedValue in class Node.IndexedProperty
Following copied from class: org.openide.nodes.Node.IndexedProperty
Parameters:
indx - the index
val - the value to set
Throws:
IllegalAccessException - cannot access the called method
IllegalArgumentException - wrong argument
InvocationTargetException - an exception during invocation


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.