|
JAPI 0.9.0 Yet another Java API API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TreeTableModel<R,T>
The TreeTableModel
interface specifies the methods the JTreeTable will use to interrogate a tabular tree data model.
JTreeTable
can be set up to display any data model which implements the TreeTableModel
interface with a couple of lines of code:
TreeTableModel myData = new MyTreeTableModel(); JTreeTable treeTable = new JTreeTable(myData);
Method Summary | |
---|---|
T |
getChild(T parent,
int index)
Returns a child with a certain index. |
int |
getChildCount(T node)
Returns the number of available children. |
Class<?> |
getColumnClass(int column)
Returns the type for column number column . |
int |
getColumnCount()
Returns the number of availible columns. |
String |
getColumnName(int column)
Returns the name for column number column . |
R |
getRoot()
Returns the root of the treetable. |
Object |
getValueAt(T node,
int column)
Returns the value to be displayed for node node at column number column . |
boolean |
isCellEditable(T node,
int column)
Indicates whether the the value for node node at column number column is editable. |
boolean |
isLeaf(T node)
Returns if node is a leaf. |
void |
setValueAt(Object value,
T node,
int column)
Sets the value for node node at column number column . |
Method Detail |
---|
T getChild(T parent, int index)
parent
- Node to return child forindex
- Index of child
null
if no child was foundTreeModel.getChild(Object, int)
int getChildCount(T node)
TreeModel.getChildCount(Object)
Class<?> getColumnClass(int column)
column
.
column
- Column to get type for
TableModel.getColumnClass(int)
int getColumnCount()
TableModel.getColumnCount()
String getColumnName(int column)
column
.
column
- Column to get name for
TableModel.getColumnName(int)
R getRoot()
Object getValueAt(T node, int column)
node
at column number column
.
node
- Node to get value ofcolumn
- Column to get value of
TableModel.getValueAt(int, int)
boolean isCellEditable(T node, int column)
node
at column number column
is editable.
node
- Node to checkcolumn
- Column to check
true
if the cell is editable, otherwise false
TableModel.isCellEditable(int, int)
boolean isLeaf(T node)
if node is a leaf.
- Parameters:
node
- Node
- Returns:
true
if node is a leaf, otherwise false
void setValueAt(Object value, T node, int column)
node
at column number column
.
value
- Value to be setnode
- Node to set value atcolumn
- Column of value in the nodeTableModel.setValueAt(Object, int, int)
|
JAPI Yet another Java API API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |