public class DefaultTreeTableModel extends AbstractTreeTableModel
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
columns
The column names.
|
protected boolean[] |
editable
The editable columns.
|
protected TreeTableNode |
root
The root node.
|
listenerList
Constructor and Description |
---|
DefaultTreeTableModel(TreeTableNode root,
java.lang.String[] columns)
Create a new tree table model with the given root node and column names.
|
DefaultTreeTableModel(TreeTableNode root,
java.lang.String[] columns,
boolean[] editable)
Create a new tree table model with the given root node and column names.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getChild(java.lang.Object node,
int index)
Get a child of a node.
|
int |
getChildCount(java.lang.Object node)
Get the number of children of a node.
|
java.lang.Class |
getColumnClass(int column)
Get the class of a column.
|
int |
getColumnCount()
Get the number of columns.
|
java.lang.String |
getColumnName(int column)
Get the name of a column.
|
java.lang.Object |
getValueAt(java.lang.Object node,
int column)
Get the number of children of a node.
|
boolean |
isCellEditable(java.lang.Object node,
int column)
Test if a cell is editable
|
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, getPathToRoot, getPathToRoot, getRoot, isLeaf, reload, removeTreeModelListener, setValueAt, valueForPathChanged
protected TreeTableNode root
protected java.lang.String[] columns
protected boolean[] editable
public DefaultTreeTableModel(TreeTableNode root, java.lang.String[] columns)
root
- The root node.columns
- The column names.public DefaultTreeTableModel(TreeTableNode root, java.lang.String[] columns, boolean[] editable)
root
- The root node.columns
- The column names.editable
- The editable columns.public java.lang.Class getColumnClass(int column)
getColumnClass
in interface TreeTableModel
getColumnClass
in class AbstractTreeTableModel
column
- The column.public java.lang.Object getChild(java.lang.Object node, int index)
node
- The node.index
- The index of the child.public int getChildCount(java.lang.Object node)
node
- The node.public java.lang.Object getValueAt(java.lang.Object node, int column)
node
- The node.column
- The column.public int getColumnCount()
public java.lang.String getColumnName(int column)
column
- The column.public boolean isCellEditable(java.lang.Object node, int column)
isCellEditable
in interface TreeTableModel
isCellEditable
in class AbstractTreeTableModel