public abstract class AbstractTreeTableModel extends Object implements TreeTableModel
Module: swing-util-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>swing-util-api</artifactId> </dependency>
Modifier and Type | Field and Description |
---|---|
protected EventListenerList |
listenerList
The
EventListenerList associated with this AbstractTreeTableModel. |
Constructor and Description |
---|
AbstractTreeTableModel(Object root)
Creates a new AbstractTreeTableModel object.
|
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.
|
Class<?> |
getColumnClass(int column)
Returns the class of the column specified in the argument.
|
int |
getIndexOfChild(Object parent,
Object child)
Returns the index of a child given a parent.
|
Object |
getRoot()
Returns the root of this AbstractTreeTableModel.
|
boolean |
isCellEditable(Object node,
int column)
By default, make the column with the Tree in it the only editable one.
|
boolean |
isLeaf(Object node)
Returns true if the specified node is a leaf, false otherwise.
|
void |
removeTreeModelListener(TreeModelListener l) |
void |
setValueAt(Object aValue,
Object node,
int column)
Should be overridden - this is a no-op.
|
void |
valueForPathChanged(TreePath path,
Object newValue)
Should be overridden.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getColumnCount, getColumnName, getValueAt
getChild, getChildCount
protected EventListenerList listenerList
EventListenerList
associated with this AbstractTreeTableModel.public AbstractTreeTableModel(Object root)
root
- The root of this AbstractTreeTableModel.public Object getRoot()
public boolean isLeaf(Object node)
public void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged
in interface TreeModel
path
- the TreePath.newValue
- the new value.public int getIndexOfChild(Object parent, Object child)
getIndexOfChild
in interface TreeModel
parent
- The parent object.child
- The child whose index we want.public void addTreeModelListener(TreeModelListener l)
addTreeModelListener
in interface TreeModel
l
- The TreeModelListener to add.public void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener
in interface TreeModel
l
- The TreeModelListener to remove.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 Class<?> getColumnClass(int column)
getColumnClass
in interface TreeTableModel
column
- The index of the column.public boolean isCellEditable(Object node, int column)
isCellEditable
in interface TreeTableModel
node
- The node to check.column
- The column number.public void setValueAt(Object aValue, Object node, int column)
setValueAt
in interface TreeTableModel
aValue
- The value.node
- The node.column
- The column.Copyright 2011-2015 Cytoscape Consortium. All rights reserved.