|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractTreeTableModel
TreeTableModelAdapter
public class TreeTableModelAdapter
A TreeTableModel using the Geotk
TreeTableNode. This is called
"Adapter" because it adapts a Geotk TreeTableNode for use
with SwingX TreeTableNode.
| display/geotk-widgets-swing (download) | View source code for this class |
| Field Summary |
|---|
| Fields inherited from class AbstractTreeTableModel |
|---|
modelSupport, root |
| Constructor Summary | |
|---|---|
TreeTableModelAdapter()
Creates a new tree table model with no root. |
|
TreeTableModelAdapter(TreeTableNode root)
Creates a new tree table model having the given root. |
|
| Method Summary | |
|---|---|
TreeNode |
getChild(Object node,
int index)
Returns the child of the given node at index index in the node's child array. |
int |
getChildCount(Object node)
Returns the number of children of parent. |
Class<?> |
getColumnClass(int column)
Returns the most specific superclass for all the cell values in the column. |
int |
getColumnCount()
Returns the number of columns in the model. |
int |
getIndexOfChild(Object node,
Object child)
Returns the index of the given child in the given node. |
TreeTableNode |
getRoot()
Returns the root of the tree. |
Object |
getValueAt(Object node,
int column)
Gets the value for the given node at given column. |
boolean |
isLeaf(Object node)
Returns true if the given node is a leaf. |
void |
setRoot(TreeTableNode root)
Sets a new root for this table model. |
void |
setValueAt(Object value,
Object node,
int column)
Sets the value for the given node at the given column index. |
| Methods inherited from class AbstractTreeTableModel |
|---|
addTreeModelListener, getColumnName, getHierarchicalColumn, getTreeModelListeners, isCellEditable, removeTreeModelListener, valueForPathChanged |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TreeTableModelAdapter()
setRoot
method must be invoked before this instance can be used.
public TreeTableModelAdapter(TreeTableNode root)
root - The root of the tree table model.| Method Detail |
|---|
public TreeTableNode getRoot()
getRoot in interface TreeModelgetRoot in class AbstractTreeTableModelpublic void setRoot(TreeTableNode root)
root - The new root.public int getColumnCount()
public Class<?> getColumnClass(int column)
getColumnClass in interface TreeTableModelgetColumnClass in class AbstractTreeTableModelcolumn - The index of the column.
public Object getValueAt(Object node,
int column)
node - The node whose value is to be queried.column - The column whose value is to be queried.
null if none.
IllegalArgumentException - If the given node is not an instance of TreeTableNode.
public void setValueAt(Object value,
Object node,
int column)
setValueAt in interface TreeTableModelsetValueAt in class AbstractTreeTableModelvalue - The new value.node - The node whose value is to be changed.column - The column whose value is to be changed.
IllegalArgumentException - If the given node is not an instance of TreeTableNode.public boolean isLeaf(Object node)
true if the given node is a leaf.
isLeaf in interface TreeModelisLeaf in class AbstractTreeTableModelnode - A node in the tree.
true if the given node is a leaf.
IllegalArgumentException - If the given node is not an instance of TreeTableNode.public int getChildCount(Object node)
node - The parent node in the tree.
IllegalArgumentException - If the given node is not an instance of TreeTableNode.
public TreeNode getChild(Object node,
int index)
node - The parent node in the tree.index - Index of the child to get.
IllegalArgumentException - If the given node is not an instance of TreeTableNode.
public int getIndexOfChild(Object node,
Object child)
-1.
node - A note in the tree.child - The node we are interested in.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||