Package ucar.ui.table
Class TreeTableModelAbstract
- java.lang.Object
-
- ucar.ui.table.TreeTableModelAbstract
-
- All Implemented Interfaces:
TreeModel
,TreeTableModel
- Direct Known Subclasses:
TreeTableModelSorted
public abstract class TreeTableModelAbstract extends Object implements TreeTableModel
-
-
Field Summary
Fields Modifier and Type Field Description protected EventListenerList
listenerList
protected Object
root
-
Constructor Summary
Constructors Constructor Description TreeTableModelAbstract(Object root)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTreeModelListener(TreeModelListener l)
protected void
fireTreeNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children)
protected void
fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children)
protected void
fireTreeNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children)
protected void
fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children)
Class
getColumnClass(int column)
Returns the type for column numbercolumn
.int
getIndexOfChild(Object parent, Object child)
Object
getRoot()
boolean
isCellEditable(Object node, int column)
By default, make the column with the Tree in it the only editable one.boolean
isLeaf(Object node)
void
removeTreeModelListener(TreeModelListener l)
void
setValueAt(Object aValue, Object node, int column)
Sets the value for nodenode
, at column numbercolumn
.void
valueForPathChanged(TreePath path, Object newValue)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.tree.TreeModel
getChild, getChildCount
-
Methods inherited from interface ucar.ui.table.TreeTableModel
getColumnCount, getColumnName, getValueAt
-
-
-
-
Field Detail
-
root
protected Object root
-
listenerList
protected EventListenerList listenerList
-
-
Constructor Detail
-
TreeTableModelAbstract
public TreeTableModelAbstract(Object root)
-
-
Method Detail
-
valueForPathChanged
public void valueForPathChanged(TreePath path, Object newValue)
- Specified by:
valueForPathChanged
in interfaceTreeModel
-
getIndexOfChild
public int getIndexOfChild(Object parent, Object child)
- Specified by:
getIndexOfChild
in interfaceTreeModel
-
addTreeModelListener
public void addTreeModelListener(TreeModelListener l)
- Specified by:
addTreeModelListener
in interfaceTreeModel
-
removeTreeModelListener
public void removeTreeModelListener(TreeModelListener l)
- Specified by:
removeTreeModelListener
in interfaceTreeModel
-
fireTreeNodesChanged
protected void fireTreeNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children)
-
fireTreeNodesInserted
protected void fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children)
-
fireTreeNodesRemoved
protected void fireTreeNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children)
-
fireTreeStructureChanged
protected void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children)
-
getColumnClass
public Class getColumnClass(int column)
Description copied from interface:TreeTableModel
Returns the type for column numbercolumn
.- Specified by:
getColumnClass
in interfaceTreeTableModel
-
isCellEditable
public boolean isCellEditable(Object node, int column)
By default, make the column with the Tree in it the only editable one. Making this column editable causes the JTable to forward mouse and keyboard events in the Tree column to the underlying JTree.- Specified by:
isCellEditable
in interfaceTreeTableModel
-
setValueAt
public void setValueAt(Object aValue, Object node, int column)
Description copied from interface:TreeTableModel
Sets the value for nodenode
, at column numbercolumn
.- Specified by:
setValueAt
in interfaceTreeTableModel
-
-