|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITreeState
Tree state holds information about a tree such as which nodes are expanded / collapsed and which nodes are selected, It can also fire callbacks on listener in case any of the information changed.
Method Summary | |
---|---|
void |
addTreeStateListener(ITreeStateListener l)
Adds a tree state listener. |
void |
collapseAll()
Collapses all nodes of the tree. |
void |
collapseNode(Object node)
Collapses the given node. |
void |
expandAll()
Expands all nodes of the tree. |
void |
expandNode(Object node)
Expands the given node. |
Collection<Object> |
getSelectedNodes()
Returns the collection of all selected nodes. |
boolean |
isAllowSelectMultiple()
Returns whether multiple nodes can be selected. |
boolean |
isNodeExpanded(Object node)
Returns true if the given node is expanded. |
boolean |
isNodeSelected(Object node)
Returns true if the given node is selected, false otherwise. |
void |
removeTreeStateListener(ITreeStateListener l)
Removes a tree state listener. |
void |
selectNode(Object node,
boolean selected)
Marks given node as selected (or unselected) according to the selected value. |
void |
setAllowSelectMultiple(boolean value)
Sets whether multiple nodes can be selected. |
Method Detail |
---|
void addTreeStateListener(ITreeStateListener l)
l
- Listener to addvoid collapseAll()
void collapseNode(Object node)
node
- Node to collapsevoid expandAll()
void expandNode(Object node)
node
- Node to expandCollection<Object> getSelectedNodes()
boolean isAllowSelectMultiple()
boolean isNodeExpanded(Object node)
node
- The node to inspect
boolean isNodeSelected(Object node)
node
- The node to inspect
void removeTreeStateListener(ITreeStateListener l)
l
- The listener to removevoid selectNode(Object node, boolean selected)
If tree is in single selection mode and a new node is selected, old node is automatically unselected (and the event is fired on listeners).
node
- The node to select or deselectselected
- If true, the node will be selected, otherwise, the node will be unselectedvoid setAllowSelectMultiple(boolean value)
value
- If true, multiple nodes can be selected. If false, only one node at a time can be
selected
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |