public class InvisibleTreeModel
extends javax.swing.tree.DefaultTreeModel
DefaultTreeModel
that contains InvisibleNode
s.Constructor and Description |
---|
InvisibleTreeModel(javax.swing.tree.TreeNode root)
Constructor
|
InvisibleTreeModel(javax.swing.tree.TreeNode root,
boolean asksAllowsChildren)
Constuctor
|
InvisibleTreeModel(javax.swing.tree.TreeNode root,
boolean asksAllowsChildren,
boolean filterIsActive)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
activateFilter(boolean newValue)
Activate/deactivate the visibility filter
|
java.lang.Object |
getChild(java.lang.Object parent,
int index) |
int |
getChildCount(java.lang.Object parent) |
boolean |
isActivatedFilter()
Return true if the visibility filter is active
|
addTreeModelListener, asksAllowsChildren, getIndexOfChild, getListeners, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
public InvisibleTreeModel(javax.swing.tree.TreeNode root)
root
- the root of the treepublic InvisibleTreeModel(javax.swing.tree.TreeNode root, boolean asksAllowsChildren)
root
- the root of the treeasksAllowsChildren
- asksAllowsChildren - a boolean, false if any node
can have children, true if each node is asked to see if it can
have childrenpublic InvisibleTreeModel(javax.swing.tree.TreeNode root, boolean asksAllowsChildren, boolean filterIsActive)
root
- the root of the treeasksAllowsChildren
- asksAllowsChildren - a boolean, false if any node
can have children, true if each node is asked to see if it can
have childrenfilterIsActive
- true if the visibility filter is activepublic void activateFilter(boolean newValue)
newValue
- true if the visibility filter should be activepublic boolean isActivatedFilter()
public java.lang.Object getChild(java.lang.Object parent, int index)
getChild
in interface javax.swing.tree.TreeModel
getChild
in class javax.swing.tree.DefaultTreeModel
public int getChildCount(java.lang.Object parent)
getChildCount
in interface javax.swing.tree.TreeModel
getChildCount
in class javax.swing.tree.DefaultTreeModel