public abstract class AbstractTreeTableModel extends java.lang.Object implements TreeTableModel
Modifier and Type | Field and Description |
---|---|
protected javax.swing.event.EventListenerList |
listenerList |
protected java.lang.Object |
root |
Constructor and Description |
---|
AbstractTreeTableModel(java.lang.Object root) |
Modifier and Type | Method and Description |
---|---|
void |
addTreeModelListener(javax.swing.event.TreeModelListener l) |
protected void |
fireTreeNodesChanged(java.lang.Object source,
java.lang.Object[] path,
int[] childIndices,
java.lang.Object[] children) |
protected void |
fireTreeNodesInserted(java.lang.Object source,
java.lang.Object[] path,
int[] childIndices,
java.lang.Object[] children) |
protected void |
fireTreeNodesRemoved(java.lang.Object source,
java.lang.Object[] path,
int[] childIndices,
java.lang.Object[] children) |
protected void |
fireTreeStructureChanged(java.lang.Object source,
java.lang.Object[] path,
int[] childIndices,
java.lang.Object[] children) |
java.lang.Class |
getColumnClass(int column)
Returns the type for column number
column . |
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child) |
javax.swing.tree.TreeNode[] |
getPathToRoot(javax.swing.tree.TreeNode aNode)
Builds the parents of node up to and including the root node,
where the original node is the last element in the returned array.
|
protected javax.swing.tree.TreeNode[] |
getPathToRoot(javax.swing.tree.TreeNode aNode,
int depth)
Builds the parents of node up to and including the root node,
where the original node is the last element in the returned array.
|
java.lang.Object |
getRoot() |
boolean |
isCellEditable(java.lang.Object node,
int column)
By default, make the column with the Tree in it the only editable one.
|
boolean |
isLeaf(java.lang.Object node) |
void |
reload(javax.swing.tree.TreeNode node)
Invoke this method if you've modified the
TreeNode s upon which
this model depends. |
void |
removeTreeModelListener(javax.swing.event.TreeModelListener l) |
void |
setValueAt(java.lang.Object aValue,
java.lang.Object node,
int column)
Sets the value for node
node ,
at column number column . |
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getColumnCount, getColumnName, getValueAt
protected java.lang.Object root
protected javax.swing.event.EventListenerList listenerList
public java.lang.Object getRoot()
getRoot
in interface javax.swing.tree.TreeModel
public boolean isLeaf(java.lang.Object node)
isLeaf
in interface javax.swing.tree.TreeModel
public void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
valueForPathChanged
in interface javax.swing.tree.TreeModel
public int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
getIndexOfChild
in interface javax.swing.tree.TreeModel
public void addTreeModelListener(javax.swing.event.TreeModelListener l)
addTreeModelListener
in interface javax.swing.tree.TreeModel
public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
removeTreeModelListener
in interface javax.swing.tree.TreeModel
public void reload(javax.swing.tree.TreeNode node)
TreeNode
s upon which
this model depends. The model will notify all of its listeners that the
model has changed below the given node.node
- the node below which the model has changedpublic javax.swing.tree.TreeNode[] getPathToRoot(javax.swing.tree.TreeNode aNode)
aNode
- the TreeNode to get the path forprotected javax.swing.tree.TreeNode[] getPathToRoot(javax.swing.tree.TreeNode aNode, int depth)
aNode
- the TreeNode to get the path fordepth
- an int giving the number of steps already taken towards
the root (on recursive calls), used to size the returned arrayprotected void fireTreeNodesChanged(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
protected void fireTreeNodesInserted(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
protected void fireTreeNodesRemoved(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
protected void fireTreeStructureChanged(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
public java.lang.Class getColumnClass(int column)
TreeTableModel
column
.getColumnClass
in interface TreeTableModel
public boolean isCellEditable(java.lang.Object node, int column)
isCellEditable
in interface TreeTableModel
public void setValueAt(java.lang.Object aValue, java.lang.Object node, int column)
TreeTableModel
node
,
at column number column
.setValueAt
in interface TreeTableModel