Package org.jdesktop.swingx.treetable
Class DefaultMutableTreeTableNode
java.lang.Object
org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode
- All Implemented Interfaces:
TreeNode
,MutableTreeTableNode
,TreeTableNode
A default implementation of an
AbstractMutableTreeTableNode
that
returns getUserObject().toString()
for all value queries. This
implementation is designed mainly for testing. It is NOT recommended to use
this implementation. Any user that needs to create TreeTableNode
s
should consider directly extending AbstractMutableTreeTableNode
or
directly implementing the interface.- Author:
- Karl Schaefer
-
Field Summary
Fields inherited from class org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
allowsChildren, children, parent, userObject
-
Constructor Summary
ConstructorsConstructorDescriptionnode without userObjectDefaultMutableTreeTableNode
(Object userObject) DefaultMutableTreeTableNode
(Object userObject, boolean allowsChildren) -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of columns supported by thisTreeTableNode
.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
setValueAt
(Object aValue, int column) Sets the value for the givencolumn
.Methods inherited from class org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
add, children, createChildrenList, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, getUserObject, insert, isLeaf, remove, remove, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
-
Constructor Details
-
DefaultMutableTreeTableNode
public DefaultMutableTreeTableNode()node without userObject -
DefaultMutableTreeTableNode
- Parameters:
userObject
- at node
-
DefaultMutableTreeTableNode
- Parameters:
userObject
- at nodeallowsChildren
- if true
-
-
Method Details
-
getValueAt
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
-
getColumnCount
public int getColumnCount()Returns the number of columns supported by thisTreeTableNode
.- Returns:
- the number of columns this node supports
-
isEditable
public boolean isEditable(int column) Determines whether the specified column is editable.- Specified by:
isEditable
in interfaceTreeTableNode
- Overrides:
isEditable
in classAbstractMutableTreeTableNode
- Parameters:
column
- the column to query- Returns:
- always returns
false
-
setValueAt
Sets the value for the givencolumn
.impl does nothing. It is provided for convenience.
- Specified by:
setValueAt
in interfaceTreeTableNode
- Overrides:
setValueAt
in classAbstractMutableTreeTableNode
- Parameters:
aValue
- the value to setcolumn
- the column to set the value on
-