|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.swing.treetable.TreeTableModelNode.Node
public class TreeTableModelNode.Node
A Node is a derivative of the File class - though we delegate to the File object rather than subclassing it. It is used to maintain a cache of a directory's children and therefore avoid repeated access to the underlying file system during rendering.
| Field Summary | |
|---|---|
protected TreeTableModelNode.Node[] |
children
Children of the receiver. |
protected int |
level
Path of the receiver. |
protected DataModel |
model
java.io.File the receiver represents. |
| Constructor Summary | |
|---|---|
protected |
TreeTableModelNode.Node(DataModel file,
int thisLevel)
|
protected |
TreeTableModelNode.Node(TreeTableModelNode.Node parent,
DataModel model,
int thisLevel)
|
| Method Summary | |
|---|---|
protected TreeTableModelNode.Node[] |
createChildren()
Loads the children of of the receiver. |
protected TreeTableModelNode.Node[] |
getChildren()
Loads the children, caching the results in the children instance variable. |
DataModel |
getModel()
Returns the java.io.File the receiver represents. |
TreeTableModelNode.Node |
getParent()
Returns the parent of the receiver. |
TreeTableModelNode.Node[] |
getPath()
Gets the path from the root to the receiver. |
protected TreeTableModelNode.Node[] |
getPathToRoot(TreeTableModelNode.Node aNode,
int depth)
|
boolean |
isLeaf()
Returns true if the receiver represents a leaf, that is it is isn't a directory. |
protected void |
loadChildren()
Recursively loads all the children of the receiver. |
protected void |
nodeChanged()
Can be invoked when a node has changed, will create the appropriate event. |
protected void |
setChildren(TreeTableModelNode.Node[] newChildren,
boolean generateEvent)
Sets the children of the receiver, updates the total size, and if generateEvent is true a tree structure changed event is created. |
java.lang.String |
toString()
Returns the the string to be used to display this leaf in the JTree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected DataModel model
protected TreeTableModelNode.Node[] children
protected int level
| Constructor Detail |
|---|
protected TreeTableModelNode.Node(DataModel file,
int thisLevel)
protected TreeTableModelNode.Node(TreeTableModelNode.Node parent,
DataModel model,
int thisLevel)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic DataModel getModel()
public TreeTableModelNode.Node getParent()
public boolean isLeaf()
protected TreeTableModelNode.Node[] getChildren()
protected void loadChildren()
protected TreeTableModelNode.Node[] createChildren()
public TreeTableModelNode.Node[] getPath()
protected TreeTableModelNode.Node[] getPathToRoot(TreeTableModelNode.Node aNode,
int depth)
protected void setChildren(TreeTableModelNode.Node[] newChildren,
boolean generateEvent)
protected void nodeChanged()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||