public interface TreeTableModel extends TreeModel
TreeTableModel.class as the respective column class
in their implementation of the getColumnClass(int) method:
public Class<?> getColumnClass(int column)
{
if (column == columnThatShouldContainTheTree)
{
return TreeTableModel.class;
}
// Return other types as desired:
return Object.class;
}
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
getColumnClass(int column)
Returns the type for the specified column.
|
int |
getColumnCount()
Returns the number of available columns.
|
String |
getColumnName(int column)
Returns the name for the specified column
|
Object |
getValueAt(Object node,
int column)
Returns the value to be displayed for the given node in the
specified column
|
boolean |
isCellEditable(Object node,
int column)
Indicates whether the the value for the given node in the
specified column is editable
|
void |
setValueAt(Object value,
Object node,
int column)
Sets the value for the given node in the specified column
|
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChangedint getColumnCount()
String getColumnName(int column)
column - The columnClass<?> getColumnClass(int column)
TreeTableModel.class.column - The columnObject getValueAt(Object node, int column)
node - The nodecolumn - The columnboolean isCellEditable(Object node, int column)
node - The nodecolumn - The columnCopyright © 2016. All rights reserved.