public class InvisibleNode
extends javax.swing.tree.DefaultMutableTreeNode
DefaultMutableTreeNode that can hide itself in a
JTree.| Constructor and Description |
|---|
InvisibleNode()
Constructor
|
InvisibleNode(java.lang.Object userObject)
Constructor for a new node that allows children and is visible
|
InvisibleNode(java.lang.Object userObject,
boolean allowsChildren,
boolean isVisible)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
javax.swing.tree.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(java.lang.Object userObject)
userObject - the user object to wrap at the nodepublic InvisibleNode(java.lang.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 javax.swing.tree.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()