public class ExtendedTreeNode extends javax.swing.tree.DefaultMutableTreeNode implements java.lang.Iterable<ExtendedTreeNode>
Modifier and Type | Class and Description |
---|---|
class |
ExtendedTreeNode.ChildIterator |
Constructor and Description |
---|
ExtendedTreeNode() |
ExtendedTreeNode(java.lang.Object userObject)
Creates a tree node with no parent, no children, but which allows
children, and initializes it with the specified user object.
|
ExtendedTreeNode(java.lang.Object userObject,
boolean allowsChildren)
Creates a tree node with no parent, no children, initialized with
the specified user object, and that allows children only if
specified.
|
Modifier and Type | Method and Description |
---|---|
ExtendedTreeNode |
clone() |
void |
cloneExtendedTreeNodeChildren(ExtendedTreeNode familyModel)
Clones the children of a node that are of type ExtendedTreeNode
|
java.util.HashMap<java.lang.String,java.lang.Object> |
getUserInfo() |
ExtendedTreeNode.ChildIterator |
iterator() |
protected void |
setUserInfo(java.util.HashMap<java.lang.String,java.lang.Object> userInfo) |
add, breadthFirstEnumeration, children, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
public ExtendedTreeNode()
public ExtendedTreeNode(java.lang.Object userObject)
userObject
- an Object provided by the user that constitutes
the node's datapublic ExtendedTreeNode(java.lang.Object userObject, boolean allowsChildren)
userObject
- an Object provided by the user that constitutes
the node's dataallowsChildren
- if true, the node is allowed to have child
nodes -- otherwise, it is always a leaf nodepublic java.util.HashMap<java.lang.String,java.lang.Object> getUserInfo()
protected void setUserInfo(java.util.HashMap<java.lang.String,java.lang.Object> userInfo)
public ExtendedTreeNode clone()
clone
in class javax.swing.tree.DefaultMutableTreeNode
public void cloneExtendedTreeNodeChildren(ExtendedTreeNode familyModel)
familyModel
- node serving as sourcepublic ExtendedTreeNode.ChildIterator iterator()
iterator
in interface java.lang.Iterable<ExtendedTreeNode>
Copyright © 2004-2014 FEUP-LSTS and Neptus developers. All Rights Reserved.