org.openide.nodes 7.2.1

org.openide.nodes
Class Node.IndexedProperty<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>
Direct Known Subclasses:
IndexedPropertySupport
Enclosing class:
Node

public abstract static class Node.IndexedProperty<T,E>
extends Node.Property<T>

Description of an indexed property and operations on it.


Constructor Summary
Node.IndexedProperty(Class<T> valueType, Class<E> 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.
 boolean equals(Object property)
           
 Class<E> 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  E getIndexedValue(int index)
          Get the value of the property at an index.
 int hashCode()
           
abstract  void setIndexedValue(int indx, E val)
          Set the value of the property at an index.
 
Methods inherited from class org.openide.nodes.Node.Property
canRead, canWrite, getHtmlDisplayName, getPropertyEditor, getValue, getValueType, isDefaultValue, 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<T> valueType,
                            Class<E> 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<E> getElementType()
Get the element type of the property (not the type of the whole property).

Returns:
the type

getIndexedValue

public abstract E getIndexedValue(int index)
                           throws IllegalAccessException,
                                  IllegalArgumentException,
                                  InvocationTargetException
Get the value of the property at an index.

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 abstract boolean canIndexedWrite()
Test whether the property is writable by index.

Returns:
true if so

setIndexedValue

public abstract void setIndexedValue(int indx,
                                     E 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

equals

public boolean equals(Object property)
Overrides:
equals in class Node.Property<T>

hashCode

public int hashCode()
Overrides:
hashCode in class Node.Property<T>

org.openide.nodes 7.2.1

Built on January 29 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.