org.jdesktop.swingx.treetable
Interface TreeTableNode

All Superinterfaces:
TreeNode
All Known Subinterfaces:
MutableTreeTableNode
All Known Implementing Classes:
AbstractMutableTreeTableNode, DefaultMutableTreeTableNode

public interface TreeTableNode
extends TreeNode

Defines the requirements for an object that can be used as a tree node in a JXTreeTable.


Method Summary
 Enumeration<? extends TreeTableNode> children()
          Returns an enumeration this node's children.
 TreeTableNode getChildAt(int childIndex)
          Overridden to specify the return type.
 int getColumnCount()
          Returns the number of columns supported by this TreeTableNode.
 TreeTableNode getParent()
          Overridden to specify the return type.
 Object getUserObject()
          Returns this node's user object.
 Object getValueAt(int column)
          Gets the value for this node that corresponds to a particular tabular column.
 boolean isEditable(int column)
          Determines whether the specified column is editable.
 void setUserObject(Object userObject)
          Sets the user object stored in this node.
 void setValueAt(Object aValue, int column)
          Sets the value for the given column.
 
Methods inherited from interface javax.swing.tree.TreeNode
getAllowsChildren, getChildCount, getIndex, isLeaf
 

Method Detail

children

Enumeration<? extends TreeTableNode> children()
Returns an enumeration this node's children.

Specified by:
children in interface TreeNode
Returns:
an enumeration of TreeTableNodes

getValueAt

Object getValueAt(int column)
Gets the value for this node that corresponds to a particular tabular column.

Parameters:
column - the column to query
Returns:
the value for the queried column
Throws:
IndexOutOfBoundsException - if column is not a valid column index

getChildAt

TreeTableNode getChildAt(int childIndex)
Overridden to specify the return type. Returns the child TreeNode at index childIndex. Models that utilize this node should verify the column count before querying this node, since nodes may return differing sizes even for the same model.

Specified by:
getChildAt in interface TreeNode
Parameters:
childIndex - the index of the child
Returns:
the TreeTableNode corresponding to the specified index

getColumnCount

int getColumnCount()
Returns the number of columns supported by this TreeTableNode.

Returns:
the number of columns this node supports

getParent

TreeTableNode getParent()
Overridden to specify the return type. Returns the parent TreeTableNode of the receiver.

Specified by:
getParent in interface TreeNode
Returns:
the parent TreeTableNode or null if this node has no parent (such nodes are usually root nodes).

isEditable

boolean isEditable(int column)
Determines whether the specified column is editable.

Parameters:
column - the column to query
Returns:
true if the column is editable, false otherwise

setValueAt

void setValueAt(Object aValue,
                int column)
Sets the value for the given column.

Parameters:
aValue - the value to set
column - the column to set the value on

getUserObject

Object getUserObject()
Returns this node's user object.

Returns:
the Object stored at this node by the user

setUserObject

void setUserObject(Object userObject)
Sets the user object stored in this node.

Parameters:
userObject - the object to store