|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dlsc.flexgantt.swing.treetable.TreeTableNode
public class TreeTableNode
This class is primarily used internally by the TreeTable
to store the
state of its tree nodes. Objects of this class wrap the actual model nodes.
The class caches its children so that the nodes in the tree keep their expand /
collapse state even when new nodes are inserted.
Field Summary | |
---|---|
protected TreeTableNode[] |
children
The array of children entries. |
protected TreeTableNode |
parent
Reference to the parent table entry. |
Constructor Summary | |
---|---|
protected |
TreeTableNode(TreeTable table,
java.lang.Object modelNode)
Constructs a new tree table node. |
Method Summary | |
---|---|
protected void |
collapse()
Tells the entry to be closed. |
protected void |
expand()
Tells the entry to be open. |
java.lang.Object |
getChildAt(int index)
Returns the child for the given child index. |
int |
getChildCount()
Returns the total number of child nodes attached to the node. |
TreeTableNode |
getChildNode(java.lang.Object modelChildNode)
Returns the wrapping tree table node for the given model node. |
TreeTableNode[] |
getChildren()
Returns the array of child nodes. |
int |
getDepth()
Returns the depth of the node within the hierarchy. |
int |
getHeight()
Returns the row height of the node. |
java.lang.Object |
getKey()
Returns the key value of the wrapped model node. |
ITreeTableModel |
getModel()
Returns the model to which the node (or the wrapped model node) belongs. |
java.lang.Object |
getModelNode()
Returns the model node object that is wrapped by the tree table node. |
TreeTableNode |
getParentNode()
Returns the parent node of the node. |
javax.swing.tree.TreePath |
getPath()
Returns a tree path for the node. |
int |
getRow()
Returns the row of the entry inside the table. |
TreeTable |
getTreeTable()
Returns the tree table in which the node gets displayed. |
java.lang.Object |
getValueAt(int index)
Returns the column value of the wrapped model node for the given model index. |
int |
getY()
Returns the y-coordiante of the row in which the node gets displayed. |
boolean |
isExpanded()
Determines if the node is currently expanded. |
boolean |
isLeaf()
Determines if the tree node is a leaf, which means that the node does not have any child nodes attached to it. |
boolean |
isLoaded()
Determines if the node has already loaded its child elements. |
boolean |
isNewEntryPlaceholder()
Determines if the node is the one that gets used to create new nodes. |
protected void |
load()
Loads the children nodes from the model, wraps each one of them and adds them to this node. |
protected void |
setDepth(int depth)
Sets the depth of the node within the hierarchy. |
protected void |
setHeight(int height)
Sets the row height of the node. |
protected void |
setParent(TreeTableNode parent)
Sets the node's parent node. |
protected void |
setRow(int row)
Sets the row index on the node. |
protected void |
setY(int y)
Sets the y-coordiante of the row in which the node gets displayed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected TreeTableNode parent
protected TreeTableNode[] children
Constructor Detail |
---|
protected TreeTableNode(TreeTable table, java.lang.Object modelNode)
table
- the table in which the node gets shownmodelNode
- the wrapped model nodeMethod Detail |
---|
public boolean isNewEntryPlaceholder()
public TreeTable getTreeTable()
public ITreeTableModel getModel()
public boolean isLoaded()
protected void load()
public java.lang.Object getModelNode()
public javax.swing.tree.TreePath getPath()
public java.lang.Object getValueAt(int index)
index
- the model index
ITreeTableModel.getColumnValue(Object, int)
public java.lang.Object getKey()
ITreeTableModel.getKey(Object)
protected void setDepth(int depth)
depth
- the depth of the node within the hierarchygetPath()
public int getDepth()
getPath()
protected void setParent(TreeTableNode parent)
parent
- the parent node of the nodepublic TreeTableNode getParentNode()
public boolean isLeaf()
public int getChildCount()
TreeModel.getChildCount(Object)
public java.lang.Object getChildAt(int index)
index
- the index for which to return the child node
TreeModel.getChild(Object, int)
public TreeTableNode[] getChildren()
public TreeTableNode getChildNode(java.lang.Object modelChildNode)
modelChildNode
- the model child node for which to return the wrapping tree
table node
protected void expand()
protected void collapse()
public boolean isExpanded()
protected void setRow(int row)
row
- the node's row indexpublic int getRow()
protected void setHeight(int height)
height
- the node's row heightpublic int getHeight()
protected void setY(int y)
y
- the y-coordinate of the node's rowpublic int getY()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |