| |
|
| java.lang.Object javax.swing.tree.DefaultMutableTreeNode org.wingx.tree.XTreeNode
All known Subclasses: org.wingx.treetable.DefaultTreeTableNode,
Constructor Summary | |
protected | XTreeNode(Object userObject) Creates a tree node with no parent, no children, initialized with
the specified user object. | public | XTreeNode(TreeModel treeModel, Object userObject, boolean allowsChildren) construct the node with the tree model,
the tree model must always be passed in the constructor,
each node knows it's model from the start. |
XTreeNode | protected XTreeNode(Object userObject)(Code) | | Creates a tree node with no parent, no children, initialized with
the specified user object. For default the XTreeTableNode doesn't
allow children.
Parameters: userObject - an Object provided by the user that constitutesthe node's data |
XTreeNode | public XTreeNode(TreeModel treeModel, Object userObject, boolean allowsChildren)(Code) | | construct the node with the tree model,
the tree model must always be passed in the constructor,
each node knows it's model from the start.
Parameters: treeModel - |
addNotify | public void addNotify(MutableTreeNode newChild)(Code) | | add the child node,
and notify the model if it is a default tree model
Parameters: newChild - Parameters: parent - Parameters: index - |
doInitialize | abstract protected void doInitialize()(Code) | | do the initialization
|
getDepth | public int getDepth()(Code) | | get the distance of this node from the root node
the children of the root node have a depth of 1.
Returns the depth. |
getNodeChildAt | public XTreeNode getNodeChildAt(int index)(Code) | | type cast the child ot an onode
Parameters: index - |
initialize | public void initialize()(Code) | | lazy initialization
|
insertNotify | public void insertNotify(MutableTreeNode newChild, int index)(Code) | | insert the child node,
and notify the model if it is a default tree model
Parameters: newChild - Parameters: index - |
isExpanded | public boolean isExpanded()(Code) | | return the expanded state.
the expanded state is held in the model
because certain tree implementations perform
expand / collapse at the model level.
Returns the expanded. |
isInitialized | public boolean isInitialized()(Code) | | Returns the initialized. |
reinitialize | public void reinitialize()(Code) | | reinitialize
|
removeAllChildrenNotify | public void removeAllChildrenNotify()(Code) | | remove all children
|
setExpanded | public void setExpanded(boolean expanded)(Code) | | Parameters: expanded - The expanded to set. |
setInitialized | public void setInitialized(boolean initialized)(Code) | | |
setTreeModel | public void setTreeModel(TreeModel treeModel)(Code) | | Set the tree model as tree model of current
node.
Parameters: treeModel - The tree model of the wholetree. |
|
|
|