public class InvisibleNode extends DefaultMutableTreeNode
DefaultMutableTreeNode that can hide itself in a
JTree.EMPTY_ENUMERATION| Constructor and Description |
|---|
InvisibleNode()
Constructor
|
InvisibleNode(Object userObject)
Constructor for a new node that allows children and is visible
|
InvisibleNode(Object userObject,
boolean allowsChildren,
boolean isVisible)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
TreeNode |
getChildAt(int index,
boolean filterIsActive)
Get a child node
|
int |
getChildCount(boolean filterIsActive)
Get the number of children nodes
|
boolean |
isVisible()
Returns true if this node is visible
|
void |
setVisible(boolean visible)
Set the visible status of this node
|
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, 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, toStringpublic InvisibleNode()
public InvisibleNode(Object userObject)
userObject - the user object to wrap at the nodepublic InvisibleNode(Object userObject, boolean allowsChildren, boolean isVisible)
userObject - the user object to wrap at the nodeallowsChildren - true if this node allows children (not a leaf)isVisible - true if this node is visible initiallypublic TreeNode getChildAt(int index, boolean filterIsActive)
index - the index of the node to getfilterIsActive - true if the visible filter is activepublic int getChildCount(boolean filterIsActive)
filterIsActive - true if the visible filter is active (alters the
count according to visibility)public void setVisible(boolean visible)
visible - true if this node should be visiblepublic boolean isVisible()
Copyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.