|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sciapp.treetable.AbstractTreeTableModel
com.sciapp.treetable.MutableTreeTableModel
com.sciapp.treetable.ComparableTreeTableModel
com.sciapp.treetable.DefaultMutableTreeTableModel
com.sciapp.treetable.UniqueTreeTableModel
public class UniqueTreeTableModel
UniqueTreeTableModel is a TreeTableModel that builds a set of unique tree nodes at each tree level.
| Field Summary | |
|---|---|
static int |
LEVEL_MODE
the level mode |
protected int |
mode
the mode that is used to build the unique structure by level |
protected TreeTableModel |
model
the underlying treetable model |
protected Comparator |
nodeComparator
the comparator that is used to compare tree nodes between them at each tree level |
static int |
ROOT_MODE
the root mode |
protected boolean |
sorted
flag indicating whether the unique level values will be sorted |
| Fields inherited from class com.sciapp.treetable.DefaultMutableTreeTableModel |
|---|
editable |
| 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 | |
|---|---|
UniqueTreeTableModel(TreeTableModel model,
Comparator nodeComparator)
Constructs a UniqueTreeTableModel that compares nodes with the supplied nodeComparator. |
|
UniqueTreeTableModel(TreeTableModel model,
int column)
Constructs a UniqueTreeTableModel that compares nodes at a designated column with a GeneralComparator. |
|
UniqueTreeTableModel(TreeTableModel model,
int column,
Comparator columnComparator)
Constructs a UniqueTreeTableModel that compares nodes at a designated column and comparator. |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all children from the root node and rebuilds the model. |
int |
getChildCount(Object parent)
Returns the number of children of parent.
Returns 0 if the node
is a leaf or if it has no children. parent must be a node
previously obtained from this data source. |
Class |
getColumnClass(int column)
Returns the class of all the cells in the column. |
String |
getColumnName(int column)
Returns the name of the column at columnIndex as it will be displayed by the table |
int |
getMode()
Determines the mode that is used to build the level structure. |
String |
getStringForLevel(int level)
Returns the string to return for the supplied level. |
TreeTableModel |
getTreeTableModel()
Returns the underlying treetable model. |
boolean |
isSorted()
Determines whether the unique level values will be sorted. |
void |
setMode(int mode)
Determines the mode that is used to build the level structure. |
void |
setNodeComparator(Comparator nodeComparator)
Assigns the comparator that will be used to make out the unique nodes at each tree level. |
void |
setSorted(boolean sorted)
Determines whether the unique level values will be sorted. |
void |
setTreeTableModel(TreeTableModel model)
Assigns a new underlying treetable model |
| Methods inherited from class com.sciapp.treetable.DefaultMutableTreeTableModel |
|---|
createLeafNode, createNonLeafNode, getEditable, getValueAt, isCellEditable, replicateLeafNode, setEditable, setValueAt |
| Methods inherited from class com.sciapp.treetable.MutableTreeTableModel |
|---|
addColumn, addColumn, addReorderListener, fireRowsMapped, fireRowsReordered, getChild, getColumnCount, getIndexOfChild, getPathToRoot, getPathToRoot, insertNodeInto, 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 |
| Field Detail |
|---|
protected TreeTableModel model
protected int mode
protected boolean sorted
protected Comparator nodeComparator
public static final int ROOT_MODE
public static final int LEVEL_MODE
| Constructor Detail |
|---|
public UniqueTreeTableModel(TreeTableModel model,
int column)
GeneralComparator.
public UniqueTreeTableModel(TreeTableModel model,
int column,
Comparator columnComparator)
public UniqueTreeTableModel(TreeTableModel model,
Comparator nodeComparator)
nodeComparator.
| Method Detail |
|---|
public void clear()
clear in class MutableTreeTableModelpublic int getChildCount(Object parent)
parent.
Returns 0 if the node
is a leaf or if it has no children. parent must be a node
previously obtained from this data source.
getChildCount in interface TreeModelgetChildCount in class MutableTreeTableModelparent - a node in the tree, obtained from this data source
parentpublic Class getColumnClass(int column)
getColumnClass in interface TreeTableModelgetColumnClass in class MutableTreeTableModelcolumn - the index of the column
public String getColumnName(int column)
getColumnName in interface TreeTableModelgetColumnName in class MutableTreeTableModelcolumn - the index of the column
public int getMode()
The default mode is ROOT_MODE.
public String getStringForLevel(int level)
level - the node levelpublic TreeTableModel getTreeTableModel()
public boolean isSorted()
public void setMode(int mode)
The default mode is ROOT_MODE.
mode - the mode used to build the tree structurepublic void setNodeComparator(Comparator nodeComparator)
nodeComparator - the comparator to usepublic void setSorted(boolean sorted)
sorted - true if the list of unique values is sorted, false otherwise.public void setTreeTableModel(TreeTableModel model)
model - the new treetablemodel to assign
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||