org.openide.nodes
Class Node.IndexedProperty

java.lang.Object
  |
  +--java.beans.FeatureDescriptor
        |
        +--org.openide.nodes.Node.Property
              |
              +--org.openide.nodes.Node.IndexedProperty
Direct Known Subclasses:
IndexedPropertySupport
Enclosing class:
Node

public abstract static class Node.IndexedProperty
extends Node.Property

Description of an indexed property and operations on it.


Constructor Summary
Node.IndexedProperty(Class valueType, Class elementType)
          Constructor.
 
Method Summary
abstract  boolean canIndexedRead()
          Test whether the property is readable by index.
abstract  boolean canIndexedWrite()
          Test whether the property is writable by index.
 Class getElementType()
          Get the element type of the property (not the type of the whole property).
 PropertyEditor getIndexedPropertyEditor()
          Get a property editor for individual elements in this property.
abstract  Object getIndexedValue(int index)
          Get the value of the property at an index.
abstract  void setIndexedValue(int indx, Object val)
          Set the value of the property at an index.
 
Methods inherited from class org.openide.nodes.Node.Property
canRead, canWrite, equals, getPropertyEditor, getValue, getValueType, hashCode, restoreDefaultValue, setValue, supportsDefaultValue
 
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

Node.IndexedProperty

public Node.IndexedProperty(Class valueType,
                            Class elementType)
Constructor.
Parameters:
valueType - type of the property
Method Detail

canIndexedRead

public abstract boolean canIndexedRead()
Test whether the property is readable by index.
Returns:
true if so

getElementType

public Class getElementType()
Get the element type of the property (not the type of the whole property).
Returns:
the type

getIndexedValue

public abstract Object getIndexedValue(int index)
                                throws IllegalAccessException,
                                       IllegalArgumentException,
                                       InvocationTargetException
Get the value of the property at an index.
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 abstract boolean canIndexedWrite()
Test whether the property is writable by index.
Returns:
true if so

setIndexedValue

public abstract void setIndexedValue(int indx,
                                     Object val)
                              throws IllegalAccessException,
                                     IllegalArgumentException,
                                     InvocationTargetException
Set the value of the property at an index.
Parameters:
indx - the index
val - the value to set
Throws:
IllegalAccessException - cannot access the called method
IllegalArgumentException - wrong argument
InvocationTargetException - an exception during invocation

getIndexedPropertyEditor

public PropertyEditor getIndexedPropertyEditor()
Get a property editor for individual elements in this property.
Returns:
the property editor for elements


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