|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.citra.treetable.AbstractTreeTableModel
com.citra.treetable.TreeModelMap
com.citra.treetable.TreeTableModelMap
public class TreeTableModelMap
TreeTableModelMap wraps around a TreeTableModel.
Field Summary | |
---|---|
protected TreeTableModel |
treeTableModel
the underlying treetable model. |
Fields inherited from class com.citra.treetable.TreeModelMap |
---|
treeModel |
Fields inherited from class com.citra.treetable.AbstractTreeTableModel |
---|
listenerList, root |
Fields inherited from interface com.citra.treetable.TreeTableModel |
---|
CHANGE_COLUMN_SOURCE |
Constructor Summary | |
---|---|
TreeTableModelMap(TreeTableModel treeTableModel)
Constructs a TreeTableModelMap. |
Method Summary | |
---|---|
void |
addReorderListener(ReorderListener l)
Adds a ReorderListener that is notified each time a change to the data model occurs so that the table updates the selected rows accordingly. |
void |
fireRowsMapped(int[] changedIndices)
Notifies listeners that the rows of the table have been reordered according to the changedIndices map. |
void |
fireRowsReordered(ReorderEvent event)
Notifies listeners that the rows of the table have been reordered in some way. |
Class |
getColumnClass(int columnIndex)
Returns the class of all the cells in the column. |
int |
getColumnCount()
Returns the number of columns. |
String |
getColumnName(int columnIndex)
Returns the name of the column at columnIndex as it will be displayed by the table |
TreeTableModel |
getInnerTreeTableModel()
In a chain of TreeTableModelMaps, this method returns the inner most treetable model that is not an instanceof TreeTableModelMap. |
int[] |
getMappedIndexes(Object node)
Returns an array representing how the nodes' children have been transformed. |
TreeTableModel |
getTreeTableModel()
Returns the underlying tree table model. |
List |
getUncachedChildren(Object parent,
int from,
int to)
Retrieves the leaf rows from the treetable model by specifying a row interval. |
int |
getUncachedGroupCount(Object node)
Retrieves the children count for node. |
List |
getUncachedGroups(Object parent,
int from,
int to)
Retrieves the branch rows from the treetable model by specifying a row interval. |
Object |
getValueAt(Object node,
int column)
Returns the value to be displayed for node ,
at column index column . |
boolean |
isAggregate(Object row)
Determines if node is an aggregate row. |
boolean |
isCellEditable(Object node,
int columnIndex)
Returns true if node at columnIndex is editable. |
boolean |
isCountCached(Object node)
Determines whether the children count for node has been evaluated. |
boolean |
isFooter(Object row)
Determines if node is a footer. |
boolean |
isHeader(Object row)
Determines if node is a header. |
boolean |
isRangedModel()
Determines whether the cache model can fetch data in ranges. |
boolean |
isValueCached(Object node,
int column)
Determines whether the value for node at index column has been evaluated. |
void |
removeReorderListener(ReorderListener l)
Removes a listener from the list that is notified each time a reorder event is generated. |
void |
rowsReordered(ReorderEvent e)
Called whenever the rows of a JTable have been restructured. |
void |
setTreeModel(TreeModel newModel)
Sets the underlying tree model to newModel |
void |
setTreeTableModel(TreeTableModel treeTableModel)
Sets the underlying tree table model to treeTableModel . |
void |
setValueAt(Object aValue,
Object node,
int columnIndex)
Sets the value for node at columnIndex to aValue . |
Methods inherited from class com.citra.treetable.TreeModelMap |
---|
getChild, getChildCount, getIndexOfChild, getPathToRoot, getPathToRoot, getRoot, getTreeModel, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged, valueForPathChanged |
Methods inherited from class com.citra.treetable.AbstractTreeTableModel |
---|
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, fireTreeTableStructureChanged, fireTreeTableStructureChanged, removeTreeModelListener, setRoot |
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 |
---|
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged |
Field Detail |
---|
protected TreeTableModel treeTableModel
Constructor Detail |
---|
public TreeTableModelMap(TreeTableModel treeTableModel)
Method Detail |
---|
public void addReorderListener(ReorderListener l)
addReorderListener
in interface ReorderModel
l
- the ReorderListenerpublic void fireRowsMapped(int[] changedIndices)
fireRowsMapped
in interface ReorderModel
changedIndices
- int array indicating how the rows have been reordered.ReorderEvent
public void fireRowsReordered(ReorderEvent event)
fireRowsReordered
in interface ReorderModel
event
- the reorder event.ReorderEvent
public Class getColumnClass(int columnIndex)
getColumnClass
in interface TreeTableModel
columnIndex
- the index of the column
public int getColumnCount()
getColumnCount
in interface TreeTableModel
public String getColumnName(int columnIndex)
getColumnName
in interface TreeTableModel
columnIndex
- the index of the column
public int[] getMappedIndexes(Object node)
node
- the tree node
public TreeTableModel getTreeTableModel()
public List getUncachedChildren(Object parent, int from, int to)
getUncachedChildren
in interface CacheableTreeTableModel
parent
- the parent nodefrom
- the starting rowto
- the ending row
public int getUncachedGroupCount(Object node)
getUncachedGroupCount
in interface CacheableTreeTableModel
node
- the node for which the children count we want to retrieve.
public List getUncachedGroups(Object parent, int from, int to)
getUncachedGroups
in interface CacheableTreeTableModel
parent
- the parent nodefrom
- the starting rowto
- the ending row
public Object getValueAt(Object node, int column)
node
,
at column index column
.
getValueAt
in interface TreeTableModel
node
- the node to querycolumn
- the column index
public boolean isAggregate(Object row)
node
is an aggregate row.
isAggregate
in interface TreeTableModel
isAggregate
in class AbstractTreeTableModel
row
- the node to consider
node
is an aggregate row, false otherwisepublic boolean isCellEditable(Object node, int columnIndex)
node
at columnIndex is editable.
isCellEditable
in interface TreeTableModel
node
- the node to considercolumnIndex
- the column index
public boolean isCountCached(Object node)
isCountCached
in interface CacheableTreeTableModel
public boolean isFooter(Object row)
node
is a footer.
isFooter
in interface TreeTableModel
isFooter
in class AbstractTreeTableModel
row
- the row to consider
node
is a footer, false otherwisepublic boolean isHeader(Object row)
node
is a header.
isHeader
in interface TreeTableModel
isHeader
in class AbstractTreeTableModel
row
- the row to query
node
is a header, false otherwisepublic boolean isRangedModel()
isRangedModel
in interface CacheableTreeTableModel
public boolean isValueCached(Object node, int column)
isValueCached
in interface CacheableTreeTableModel
node
- the node to considercolumn
- the cell's column index
public void removeReorderListener(ReorderListener l)
removeReorderListener
in interface ReorderModel
l
- the RearrangeListenerpublic void rowsReordered(ReorderEvent e)
rowsReordered
in interface ReorderListener
e
- the ReorderEvent objectpublic void setTreeModel(TreeModel newModel)
newModel
setTreeModel
in class TreeModelMap
newModel
- the new tree model to assign.public void setTreeTableModel(TreeTableModel treeTableModel)
treeTableModel
.
This method will invoke setTreeModel
.
treeTableModel
- the new tree table model to assign.public void setValueAt(Object aValue, Object node, int columnIndex)
node
at columnIndex
to aValue
.
setValueAt
in interface TreeTableModel
aValue
- the new valuenode
- the node whose value is to be changedcolumnIndex
- the column whose value is to be changedpublic TreeTableModel getInnerTreeTableModel()
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |