|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines data model for tree.
Field Summary | |
static String |
ROOT
Constant for root node. |
Method Summary | |
void |
addModelListener(ModelListener l)
Registers given listener. |
Object[] |
getChildren(Object parent,
int from,
int to)
Returns children for given parent on given indexes. |
int |
getChildrenCount(Object node)
Returns number of children for given node. |
Object |
getRoot()
Returns the root node of the tree or null, if the tree is empty. |
boolean |
isLeaf(Object node)
Returns true if node is leaf. |
void |
removeModelListener(ModelListener l)
Unregisters given listener. |
Field Detail |
public static final String ROOT
Method Detail |
public Object getRoot()
public Object[] getChildren(Object parent, int from, int to) throws UnknownTypeException
parent
- a parent of returned nodesfrom
- a start indexto
- a end index
UnknownTypeException
- if this TreeModel implementation is not
able to resolve children for given node typepublic boolean isLeaf(Object node) throws UnknownTypeException
UnknownTypeException
- if this TreeModel implementation is not
able to resolve dchildren for given node typepublic int getChildrenCount(Object node) throws UnknownTypeException
node
- the parent node
UnknownTypeException
- if this TreeModel implementation is not
able to resolve children for given node typepublic void addModelListener(ModelListener l)
l
- the listener to addpublic void removeModelListener(ModelListener l)
l
- the listener to remove
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |