Interface TreeTableModel
- All Superinterfaces:
TreeModel
The data of a tree grid: a TreeModel whose every node also has a value
in each column.
getChildren(null) answers the roots. Children are asked for only when
a node is first opened, so a large or remote tree loads as it is
browsed. isLeaf is asked of every node shown, to decide whether it has
an arrow, and has to answer without loading the children.
Nodes are told apart by equals and hashCode, so two equal nodes are
one node to the grid: they open, close and are found together. A tree
that repeats a value, such as two leaves both named "Untitled", should
hand out node objects of its own rather than the bare values.
The model has no listeners: after a change call DataGrid#refresh(), or
DataGrid#refreshNode(Object) when only the children of one node
changed.
-
Method Summary
Modifier and TypeMethodDescriptionintHow many columns each node has.getColumnName(int column) The name of a column, the default title of its header.getValueAt(Object node, int column) The value of a node in a column.booleanisCellEditable(Object node, int column) Whether a node's value in a column may be edited.voidsetValueAt(Object node, int column, Object value) Sets a node's value in a column.Methods inherited from interface TreeModel
getChildren, isLeaf
-
Method Details
-
getColumnCount
int getColumnCount()How many columns each node has. -
getColumnName
The name of a column, the default title of its header. -
getValueAt
-
isCellEditable
Whether a node's value in a column may be edited. -
setValueAt
-