public class DefaultTreeTableNode extends javax.swing.tree.DefaultMutableTreeNode implements TreeTableNode
Modifier and Type | Field and Description |
---|---|
protected DefaultTreeTableModel |
model
The model, used to generate events.
|
protected TreeTableNodeType |
type
The node type identifier.
|
protected java.util.Map |
values
The values.
|
Constructor and Description |
---|
DefaultTreeTableNode(TreeTableNodeType type,
java.lang.Object object)
Create a tree table node with single initial value.
|
DefaultTreeTableNode(TreeTableNodeType type,
java.lang.Object object,
java.util.Map values)
Create a tree table node with initial values.
|
Modifier and Type | Method and Description |
---|---|
DefaultTreeTableNode |
getChild(java.lang.Object obj)
Get a child for the specified user object.
|
TreeTableNode[] |
getChildren()
Get all children of the node.
|
protected DefaultTreeTableModel |
getModel()
Get the model.
|
TreeTableNodeType |
getType()
Get the node type.
|
java.lang.Object |
getValue(int column)
Get the value at a specific column.
|
java.util.Map |
getValues()
Get all values at once.
|
void |
insert(javax.swing.tree.MutableTreeNode child,
int index)
Adds
child to the receiver at index . |
boolean |
instanceOf(TreeTableNodeType type)
Check if this node is an instance of the given
treetable node type.
|
void |
remove(int index)
Removes the child at
index from the receiver. |
protected void |
setModel(DefaultTreeTableModel model)
Set the model.
|
void |
setValue(int column,
java.lang.Object value)
Set the value at a specific column.
|
void |
setValues(java.util.Map values)
Set all values at once.
|
java.lang.String |
toString()
Get a string representation of this node.
|
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
protected TreeTableNodeType type
protected java.util.Map values
protected DefaultTreeTableModel model
public DefaultTreeTableNode(TreeTableNodeType type, java.lang.Object object)
type
- The node type identifier.object
- The object represented by this node.public DefaultTreeTableNode(TreeTableNodeType type, java.lang.Object object, java.util.Map values)
type
- The node type identifier.object
- The object represented by this node.values
- The initial display values.public TreeTableNodeType getType()
public boolean instanceOf(TreeTableNodeType type)
type
- The treetabel node type.public java.lang.Object getValue(int column)
getValue
in interface TreeTableNode
column
- The column.public java.util.Map getValues()
public void setValue(int column, java.lang.Object value)
column
- The column.value
- The new value.public void setValues(java.util.Map values)
values
- The new values.public void insert(javax.swing.tree.MutableTreeNode child, int index)
child
to the receiver at index
.
child
will be messaged with setParent
.
Overridden to generate tree event.insert
in interface javax.swing.tree.MutableTreeNode
insert
in class javax.swing.tree.DefaultMutableTreeNode
public void remove(int index)
index
from the receiver.
Overridden to generate tree event.remove
in interface javax.swing.tree.MutableTreeNode
remove
in class javax.swing.tree.DefaultMutableTreeNode
public DefaultTreeTableNode getChild(java.lang.Object obj)
obj
- The user object.public TreeTableNode[] getChildren()
protected void setModel(DefaultTreeTableModel model)
model
- The model.protected DefaultTreeTableModel getModel()
public java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode