public interface TreeModelFilter extends Model
TreeModel
).Modifier and Type | Method and Description |
---|---|
void |
addModelListener(ModelListener l)
Registers given listener.
|
Object[] |
getChildren(TreeModel original,
Object parent,
int from,
int to)
Returns filtered children for given parent on given indexes.
|
int |
getChildrenCount(TreeModel original,
Object node)
Returns number of filtered children for given node.
|
Object |
getRoot(TreeModel original)
Returns filtered root of hierarchy.
|
boolean |
isLeaf(TreeModel original,
Object node)
Returns true if node is leaf.
|
void |
removeModelListener(ModelListener l)
Unregisters given listener.
|
Object getRoot(TreeModel original)
original
- the original tree modelObject[] getChildren(TreeModel original, Object parent, int from, int to) throws UnknownTypeException
original.getChildren (...)
), and modify them, or return
it without modifications. You should not throw UnknownTypeException
directly from this method!original
- the original tree modelparent
- a parent of returned nodesUnknownTypeException
- this exception can be thrown from
original.getChildren (...)
method call only!int getChildrenCount(TreeModel original, Object node) throws UnknownTypeException
original
- the original tree modelnode
- the parent nodeUnknownTypeException
- if this TreeModel implementation is not
able to resolve children for given node typeboolean isLeaf(TreeModel original, Object node) throws UnknownTypeException
original
- the original tree modelUnknownTypeException
- this exception can be thrown from
original.isLeaf (...)
method call only!void addModelListener(ModelListener l)
l
- the listener to addvoid removeModelListener(ModelListener l)
l
- the listener to remove