Package org.jdesktop.swingx.treetable
Interface TreeTableNode
-
- All Superinterfaces:
javax.swing.tree.TreeNode
- All Known Subinterfaces:
MutableTreeTableNode
- All Known Implementing Classes:
AbstractMutableTreeTableNode,DefaultMutableTreeTableNode
public interface TreeTableNode extends javax.swing.tree.TreeNodeDefines the requirements for an object that can be used as a tree node in aJXTreeTable.- Author:
- Karl Schaefer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Enumeration<? extends TreeTableNode>children()Returns an enumeration this node's children.TreeTableNodegetChildAt(int childIndex)Overridden to specify the return type.intgetColumnCount()Returns the number of columns supported by thisTreeTableNode.TreeTableNodegetParent()Overridden to specify the return type.java.lang.ObjectgetUserObject()Returns this node's user object.java.lang.ObjectgetValueAt(int column)Gets the value for this node that corresponds to a particular tabular column.booleanisEditable(int column)Determines whether the specified column is editable.voidsetUserObject(java.lang.Object userObject)Sets the user object stored in this node.voidsetValueAt(java.lang.Object aValue, int column)Sets the value for the givencolumn.
-
-
-
Method Detail
-
children
java.util.Enumeration<? extends TreeTableNode> children()
Returns an enumeration this node's children.- Specified by:
childrenin interfacejavax.swing.tree.TreeNode- Returns:
- an enumeration of
TreeTableNodes
-
getValueAt
java.lang.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:
java.lang.IndexOutOfBoundsException- ifcolumnis not a valid column index
-
getChildAt
TreeTableNode getChildAt(int childIndex)
Overridden to specify the return type. Returns the childTreeNodeat indexchildIndex. 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:
getChildAtin interfacejavax.swing.tree.TreeNode- Parameters:
childIndex- the index of the child- Returns:
- the
TreeTableNodecorresponding to the specified index
-
getColumnCount
int getColumnCount()
Returns the number of columns supported by thisTreeTableNode.- Returns:
- the number of columns this node supports
-
getParent
TreeTableNode getParent()
Overridden to specify the return type. Returns the parentTreeTableNodeof the receiver.- Specified by:
getParentin interfacejavax.swing.tree.TreeNode- Returns:
- the parent
TreeTableNodeornullif 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:
trueif the column is editable,falseotherwise
-
setValueAt
void setValueAt(java.lang.Object aValue, int column)Sets the value for the givencolumn.- Parameters:
aValue- the value to setcolumn- the column to set the value on
-
getUserObject
java.lang.Object getUserObject()
Returns this node's user object.- Returns:
- the Object stored at this node by the user
-
setUserObject
void setUserObject(java.lang.Object userObject)
Sets the user object stored in this node.- Parameters:
userObject- the object to store
-
-