Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public interface TreeTableModel
ExtendsTreeModel
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.
Methods
public abstract int getColumnCount() | How many columns each node has. |
public abstract String getColumnName(int column) | The name of a column, the default title of its header. |
public abstract Object getValueAt(Object node, int column) | The value of a node in a column. |
public abstract boolean isCellEditable(Object node, int column) | Whether a node’s value in a column may be edited. |
public abstract void setValueAt(Object node, int column, Object value) | Sets a node’s value in a column. |
Inherited methods
From TreeModel
Method details
getColumnCount
public abstract int getColumnCount()getColumnName
public abstract String getColumnName(int column)getValueAt
public abstract Object getValueAt(Object node, int column)isCellEditable
public abstract boolean isCellEditable(Object node, int column)setValueAt
public abstract void setValueAt(Object node, int column, Object value)