Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.treetable
Class ListTreeTableModel

java.lang.Object
  extended by com.sciapp.treetable.AbstractTreeTableModel
      extended by com.sciapp.treetable.MutableTreeTableModel
          extended by com.sciapp.treetable.ComparableTreeTableModel
              extended by com.sciapp.treetable.ObjectTreeTableModel
                  extended by com.sciapp.treetable.ListTreeTableModel
All Implemented Interfaces:
ReorderModel, TreeTableModel, Serializable, TreeModel

public class ListTreeTableModel
extends ObjectTreeTableModel

ListTreeTableModel represents a TreeTableModel whose nodes's user objects are java.util.List objects. Setting an object other than a List will result in a ClassCastException being thrown.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sciapp.treetable.ComparableTreeTableModel
addChildForGroup, comparators, defaultComparatorsByColumnClass
 
Fields inherited from class com.sciapp.treetable.MutableTreeTableModel
classes, columns
 
Fields inherited from class com.sciapp.treetable.AbstractTreeTableModel
listenerList, root
 
Fields inherited from interface com.sciapp.treetable.TreeTableModel
CHANGE_COLUMN_SOURCE
 
Constructor Summary
ListTreeTableModel()
          Creates a ListTreeTableModel.
ListTreeTableModel(DefaultMutableTreeNode root)
          Creates a ListTreeTableModel.
ListTreeTableModel(String[] columns)
          Creates a ListTreeTableModel.
ListTreeTableModel(String[] columns, Class[] classes, DefaultMutableTreeNode root)
          Creates a ListTreeTableModel.
ListTreeTableModel(String[] columns, DefaultMutableTreeNode root)
          Creates a ListTreeTableModel.
 
Method Summary
 Object getObjectAt(Object object, int column)
          Returns the value for object at column
 void insertNodeInto(MutableTreeNode newChild, MutableTreeNode parent, int index)
          Inserts a node at a specific location index in its parents children.
 boolean isCellEditable(Object row, int column)
          Returns true if node at columnIndex is editable.
 void setObjectAt(Object aValue, Object object, int column)
          Sets the value for node at column to aValue.
 
Methods inherited from class com.sciapp.treetable.ObjectTreeTableModel
createLeafNode, createNonLeafNode, getValueAt, replicateLeafNode, setValueAt
 
Methods inherited from class com.sciapp.treetable.ComparableTreeTableModel
add, add, addNode, addRowComparator, clearComparators, comparatorsChanged, createDefaultComparators, findTreeNode, getAddChildForGroup, getDefaultComparator, getRowComparator, getRowComparators, getRowComparatorSize, insertRowComparator, loadComparators, refreshComparators, removeRowComparator, removeRowComparator, saveComparators, setAddChildForGroup, setDefaultComparator, setRowComparator
 
Methods inherited from class com.sciapp.treetable.MutableTreeTableModel
addColumn, addColumn, addReorderListener, clear, fireRowsMapped, fireRowsReordered, getChild, getChildCount, getColumnClass, getColumnCount, getColumnName, getIndexOfChild, getPathToRoot, getPathToRoot, isLeaf, moveNode, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, removeNodeFromParent, removeReorderListener, setColumnClasses, setColumnNames, valueForPathChanged
 
Methods inherited from class com.sciapp.treetable.AbstractTreeTableModel
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, fireTreeTableStructureChanged, fireTreeTableStructureChanged, getRoot, isAggregate, isFooter, isHeader, removeTreeModelListener, setRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListTreeTableModel

public ListTreeTableModel()
Creates a ListTreeTableModel.


ListTreeTableModel

public ListTreeTableModel(String[] columns)
Creates a ListTreeTableModel.


ListTreeTableModel

public ListTreeTableModel(String[] columns,
                          Class[] classes,
                          DefaultMutableTreeNode root)
Creates a ListTreeTableModel.


ListTreeTableModel

public ListTreeTableModel(String[] columns,
                          DefaultMutableTreeNode root)
Creates a ListTreeTableModel.


ListTreeTableModel

public ListTreeTableModel(DefaultMutableTreeNode root)
Creates a ListTreeTableModel.

Method Detail

getObjectAt

public Object getObjectAt(Object object,
                          int column)
Returns the value for object at column

Specified by:
getObjectAt in class ObjectTreeTableModel
Parameters:
object - the object whose value is to be queried
column - the column whose value is to be queried
Returns:
the value of the Object at the specified index

insertNodeInto

public void insertNodeInto(MutableTreeNode newChild,
                           MutableTreeNode parent,
                           int index)
Inserts a node at a specific location index in its parents children. The appropriate event is also created.

Overrides:
insertNodeInto in class MutableTreeTableModel
Parameters:
newChild - the node to insert
parent - the parent node to remove node from
index - the location in the parent node's childrens

isCellEditable

public boolean isCellEditable(Object row,
                              int column)
Returns true if node at columnIndex is editable.

Specified by:
isCellEditable in interface TreeTableModel
Overrides:
isCellEditable in class MutableTreeTableModel
Parameters:
row - the node to consider
column - the column index
Returns:
true if the node at columnIndex is editable, false otherwise

setObjectAt

public void setObjectAt(Object aValue,
                        Object object,
                        int column)
Sets the value for node at column to aValue.

Overrides:
setObjectAt in class ObjectTreeTableModel
Parameters:
aValue - the new value
object - the object whose value is to be altered
column - the column whose value is to be altered

Copyright © 2005 Scientific Applications. All Rights Reserved.