public abstract class AbstractTreeTableModel extends Object implements TreeTableModel
TreeTableModel.class as the respective column class
in their implementation of the TreeTableModel.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 | Field and Description |
|---|---|
protected Object |
root
The root node of the tree
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTreeTableModel(Object root)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTreeModelListener(TreeModelListener l) |
protected void |
fireTreeNodesChanged(Object source,
Object[] path,
int[] childIndices,
Object[] children)
Notify all listeners that have registered interest for notification on
this event type.
|
protected void |
fireTreeNodesInserted(Object source,
Object[] path,
int[] childIndices,
Object[] children)
Notify all listeners that have registered interest for notification on
this event type.
|
protected void |
fireTreeNodesRemoved(Object source,
Object[] path,
int[] childIndices,
Object[] children)
Notify all listeners that have registered interest for notification on
this event type.
|
protected void |
fireTreeStructureChanged(Object source,
Object[] path,
int[] childIndices,
Object[] children)
Notify all listeners that have registered interest for notification on
this event type.
|
int |
getIndexOfChild(Object parent,
Object child) |
Object |
getRoot() |
boolean |
isCellEditable(Object node,
int column)
Indicates whether the the value for the given node in the
specified column is editable
|
boolean |
isLeaf(Object node) |
void |
removeTreeModelListener(TreeModelListener l) |
void |
setValueAt(Object aValue,
Object node,
int column)
Sets the value for the given node in the specified column
|
void |
valueForPathChanged(TreePath path,
Object newValue) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetColumnClass, getColumnCount, getColumnName, getValueAtgetChild, getChildCountprotected Object root
protected AbstractTreeTableModel(Object root)
root - The root node of the treepublic void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged in interface TreeModelpublic int getIndexOfChild(Object parent, Object child)
getIndexOfChild in interface TreeModelpublic void addTreeModelListener(TreeModelListener l)
addTreeModelListener in interface TreeModelpublic void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener in interface TreeModelprotected final void fireTreeNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children)
source - The source of the eventpath - The tree pathchildIndices - The child indiceschildren - The childrenprotected final void fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children)
source - The source of the eventpath - The tree pathchildIndices - The child indiceschildren - The childrenprotected final void fireTreeNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children)
source - The source of the eventpath - The tree pathchildIndices - The child indiceschildren - The childrenprotected final void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children)
source - The source of the eventpath - The tree pathchildIndices - The child indiceschildren - The childrenpublic boolean isCellEditable(Object node, int column)
TreeTableModelisCellEditable in interface TreeTableModelnode - The nodecolumn - The columnpublic void setValueAt(Object aValue, Object node, int column)
TreeTableModelsetValueAt in interface TreeTableModelaValue - The value to setnode - The nodecolumn - The columnCopyright © 2016. All rights reserved.