public abstract class AbstractTreeTableModel extends Object implements TreeTableModel
Modifier and Type | Field and Description |
---|---|
protected EventListenerList |
listenerList
The list of listeners.
|
protected Object |
root
The root of the tree.
|
Constructor and Description |
---|
AbstractTreeTableModel(Object root)
Constructor for a tree-table containing only one node: the root.
|
Modifier and Type | Method and Description |
---|---|
void |
addTreeModelListener(TreeModelListener l)
Registers a new
TreeModelListener with this
model. |
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.
|
abstract Object |
getChild(Object parent,
int index) |
abstract int |
getChildCount(Object parent) |
abstract Class<?> |
getColumnClass(int column)
Returns the type for column number
column . |
abstract int |
getColumnCount()
Returns the number ofs availible column.
|
abstract String |
getColumnName(int column)
Returns the name for column number
column . |
int |
getIndexOfChild(Object parent,
Object child)
This method is not called by the current implementation of JTree.
|
Object |
getRoot()
Default implementation.
|
abstract Object |
getValueAt(Object node,
int column)
Returns the value to be displayed for node
node ,
at column number column . |
abstract boolean |
isCellEditable(Object node,
int column)
Indicates whether the the value for node
node ,
at column number column is editable. |
boolean |
isLeaf(Object node)
Is this node a leaf?
|
void |
removeTreeModelListener(TreeModelListener l)
Removes a
TreeModelListener from the list of
listeners registered with this model. |
void |
setValueAt(Object aValue,
Object node,
int column)
Default implementation.
|
void |
valueForPathChanged(TreePath path,
Object newValue) |
protected Object root
protected EventListenerList listenerList
public AbstractTreeTableModel(Object root)
public Object getRoot()
public boolean isLeaf(Object node)
public void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged
in interface TreeModel
public int getIndexOfChild(Object parent, Object child)
getIndexOfChild
in interface TreeModel
public void addTreeModelListener(TreeModelListener l)
TreeModelListener
with this
model.addTreeModelListener
in interface TreeModel
public void removeTreeModelListener(TreeModelListener l)
TreeModelListener
from the list of
listeners registered with this model.removeTreeModelListener
in interface TreeModel
protected void fireTreeNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children)
EventListenerList
protected void fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children)
EventListenerList
protected void fireTreeNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children)
EventListenerList
protected void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children)
EventListenerList
public void setValueAt(Object aValue, Object node, int column)
setValueAt
in interface TreeTableModel
public abstract Class<?> getColumnClass(int column)
TreeTableModel
column
.getColumnClass
in interface TreeTableModel
public abstract boolean isCellEditable(Object node, int column)
TreeTableModel
node
,
at column number column
is editable.isCellEditable
in interface TreeTableModel
public abstract int getChildCount(Object parent)
getChildCount
in interface TreeModel
public abstract int getColumnCount()
TreeTableModel
getColumnCount
in interface TreeTableModel
public abstract String getColumnName(int column)
TreeTableModel
column
.getColumnName
in interface TreeTableModel
public abstract Object getValueAt(Object node, int column)
TreeTableModel
node
,
at column number column
.getValueAt
in interface TreeTableModel
Copyright © 2024 GATE. All rights reserved.