public class FilteredTreeModel extends Object implements TreeModel
TreeModelFilter| Constructor and Description |
|---|
FilteredTreeModel(TreeModel delegate)
Creates a new filtered tree model for the given delegate
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTreeModelListener(TreeModelListener l) |
protected void |
fireTreeStructureChanged(Object source,
Object[] path,
int[] childIndices,
Object[] children)
Fires a treeStructureChanged event
|
Object |
getChild(Object parent,
int index) |
int |
getChildCount(Object parent) |
int |
getIndexOfChild(Object parent,
Object child) |
Object |
getRoot() |
boolean |
isLeaf(Object node) |
void |
removeTreeModelListener(TreeModelListener l) |
void |
setFilter(TreeModelFilter filter)
Set the
TreeModelFilter for this model. |
void |
valueForPathChanged(TreePath path,
Object newValue) |
public FilteredTreeModel(TreeModel delegate)
delegate - The delegate modelpublic void setFilter(TreeModelFilter filter)
TreeModelFilter for this model. If the given
filter is null, then all nodes of the delegate
model will be shown.filter - The filter to useprotected void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children)
source - The sourcepath - The tree pathschildIndices - The child indiceschildren - The childrenpublic int getIndexOfChild(Object parent, Object child)
getIndexOfChild in interface TreeModelpublic int getChildCount(Object parent)
getChildCount in interface TreeModelpublic void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged in interface TreeModelpublic void addTreeModelListener(TreeModelListener l)
addTreeModelListener in interface TreeModelpublic void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener in interface TreeModelCopyright © 2022. All rights reserved.