|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.swing.treetable.AbstractTreeTableModel
org.formaria.swing.treetable.TreeTableModelNode
public class TreeTableModelNode
A tree node wrapper for an DataModel node
Copyright (c) Formaria Ltd., 2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.
$Revision: 1.8 $
| Nested Class Summary | |
|---|---|
class |
TreeTableModelNode.Node
A Node is a derivative of the File class - though we delegate to the File object rather than subclassing it. |
| Field Summary | |
|---|---|
protected static TreeTableModelNode.Node[] |
EMPTY_CHILDREN
|
static java.lang.Integer |
ZERO
|
| Fields inherited from class org.formaria.swing.treetable.AbstractTreeTableModel |
|---|
listenerList, root |
| Constructor Summary | |
|---|---|
TreeTableModelNode()
Creates a TreeTableModelNode rooted at File.separator, which is usually the root of the file system. |
|
TreeTableModelNode(DataModel rootModel)
Creates a TreeTableModelNode with the root being rootPath. |
|
TreeTableModelNode(DataModel rootModel,
javax.swing.table.TableModel aTableModel)
|
|
| Method Summary | |
|---|---|
java.lang.Object |
getChild(java.lang.Object node,
int i)
Returns the child of node at index i. |
int |
getChildCount(java.lang.Object node)
Returns the number of children of node. |
protected java.lang.Object[] |
getChildren(java.lang.Object node)
|
java.lang.Class |
getColumnClass(int column)
Returns the class for the particular column. |
int |
getColumnCount()
Return the number of columns. |
java.lang.String |
getColumnName(int columnIndex)
Returns the name for a particular column. |
protected DataModel |
getModel(java.lang.Object node)
|
java.lang.String |
getPath(java.lang.Object node)
Returns the path node represents. |
java.lang.Object |
getValueAt(java.lang.Object node,
int columnIndex)
Returns the value of the particular column. |
boolean |
isCellEditable(java.lang.Object node,
int columnIndex)
By default, make the column with the Tree in it the only editable one. |
boolean |
isLeaf(java.lang.Object node)
Returns true if the passed in object represents a leaf, false otherwise. |
protected void |
loadChildren(TreeTableModelNode.Node node)
|
void |
nodeLoader(TreeTableModelNode.Node node)
|
void |
reloadChildren(java.lang.Object node)
Reloads the children of the specified node. |
void |
setValueAt(java.lang.Object value,
java.lang.Object node,
int columnIndex)
Sets the value for node node,
at column number column. |
| Methods inherited from class org.formaria.swing.treetable.AbstractTreeTableModel |
|---|
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, getRoot, removeTreeModelListener, valueForPathChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static TreeTableModelNode.Node[] EMPTY_CHILDREN
public static final java.lang.Integer ZERO
| Constructor Detail |
|---|
public TreeTableModelNode()
reloadChildren with the root to start loading.
public TreeTableModelNode(DataModel rootModel)
rootPath.
This does not load it, you should invoke
reloadChildren with the root to start loading.
public TreeTableModelNode(DataModel rootModel,
javax.swing.table.TableModel aTableModel)
| Method Detail |
|---|
public int getChildCount(java.lang.Object node)
node.
public java.lang.Object getChild(java.lang.Object node,
int i)
node at index i.
public boolean isLeaf(java.lang.Object node)
isLeaf in interface javax.swing.tree.TreeModelisLeaf in class AbstractTreeTableModelpublic int getColumnCount()
public java.lang.String getColumnName(int columnIndex)
public java.lang.Class getColumnClass(int column)
getColumnClass in interface TreeTableModelgetColumnClass in class AbstractTreeTableModel
public java.lang.Object getValueAt(java.lang.Object node,
int columnIndex)
public void setValueAt(java.lang.Object value,
java.lang.Object node,
int columnIndex)
TreeTableModelnode,
at column number column.
setValueAt in interface TreeTableModelsetValueAt in class AbstractTreeTableModel
public boolean isCellEditable(java.lang.Object node,
int columnIndex)
AbstractTreeTableModel
isCellEditable in interface TreeTableModelisCellEditable in class AbstractTreeTableModelpublic void reloadChildren(java.lang.Object node)
reloadChildren in class AbstractTreeTableModellevel - the depth of the treepublic java.lang.String getPath(java.lang.Object node)
node represents.
protected DataModel getModel(java.lang.Object node)
protected java.lang.Object[] getChildren(java.lang.Object node)
public void nodeLoader(TreeTableModelNode.Node node)
protected void loadChildren(TreeTableModelNode.Node node)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||