T
- the type of the node objectspublic interface ITreeTableModel<T> extends TreeModel
getKey(Object)
method
while standard values are returned by getColumnValue(Object, int)
.ITreeTableNode
,
DefaultMutableTreeTableNode
Modifier and Type | Method and Description |
---|---|
void |
addTreeTableModelListener(ITreeTableModelListener l)
Adds a listener to the model, which will be informed when key or column
values get changes.
|
Object |
getColumnValue(T node,
int columnModelIndex)
Returns an object for the given node that will be displayed in a tree
table column where the column's model index matches the given index.
It is very important to note the difference between the model index and a
columns index within a given column model.
|
Object |
getKey(T node)
Returns an object for the given node that will be displayed in the tree
table's key column.
|
Object |
getRowHeaderValue(T node)
Returns an object that will be visualized in the row header section of
the Gantt chart.
|
void |
removeTreeTableModelListener(ITreeTableModelListener l)
Removes a listener from the model.
|
void |
setColumnValue(T node,
Object value,
int columnModelIndex)
Sets a new column value for the given node and model index.
|
void |
setKey(T node,
Object key)
Sets a new object to be used as the key object for the given tree table
node.
|
void |
sort(T node,
int[] modelIndices,
boolean[] sortDirections)
Invokes multi-column sorting on the tree table model.
|
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged
Object getKey(T node)
node
- the tree table's node for which to return a key objectsetKey(Object, Object)
void setKey(T node, Object key)
node
- the node for which to specify a new key objectkey
- the node's new key objectgetKey(Object)
Object getColumnValue(T node, int columnModelIndex)
node
- the node for which to return a column value objectcolumnModelIndex
- the column's model indexsetColumnValue(Object, Object, int)
void setColumnValue(T node, Object value, int columnModelIndex)
It is very important to note the difference between the model index and a columns index within a given column model. The model index usually never changes and is used to lookup the correct piece of information from some kind of data model. The other index is simply the columns current position within the model. This index can change if the user or the application rearranges the columns.
node
- the node that will receive a new column valuevalue
- the new column valuecolumnModelIndex
- the model index that will get changedgetColumnValue(Object, int)
,
INodeEditPolicy.isValueEditable(Object, ITreeTableModel, int)
,
INodeEditPolicy.getChangeValueCommand(Object, ITreeTableModel,
Object, int)
Object getRowHeaderValue(T node)
node
- the node for which to return a header valuevoid sort(T node, int[] modelIndices, boolean[] sortDirections)
node
- the node that is the target of the sort, the node's children
will be sorted (if the node is the root then the entire table
will be sorted)modelIndices
- the model indices that are used to determine which column
values to compare for sorting (use
KeyColumn.MODEL_INDEX
to specify a sort based on the
key columnsortDirections
- if TRUE the sort direction will be ascendingvoid addTreeTableModelListener(ITreeTableModelListener l)
l
- the listener to addremoveTreeTableModelListener(ITreeTableModelListener)
void removeTreeTableModelListener(ITreeTableModelListener l)
l
- the listener to removeaddTreeTableModelListener(ITreeTableModelListener)
Copyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.