|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.markup.html.tree.DefaultTreeState
public class DefaultTreeState
Default implementation of TreeState.
This implementation tries to be as lightweight as possible. By default all nodes are collapsed.
| Constructor Summary | |
|---|---|
DefaultTreeState()
|
|
| 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 |
detach()
Detaches model after use. |
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. |
protected void |
removeSelectedNodeSilent(Object node)
|
void |
removeTreeStateListener(ITreeStateListener l)
Removes a tree state listener. |
void |
selectNode(Object node,
boolean selected)
Selects or deselects node and calls the corresponding method on all registered
ITreeStateListeners. |
void |
setAllowSelectMultiple(boolean value)
Sets whether multiple nodes can be selected. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultTreeState()
| Method Detail |
|---|
public void addTreeStateListener(ITreeStateListener l)
ITreeState
addTreeStateListener in interface ITreeStatel - Listener to addITreeState.addTreeStateListener(org.apache.wicket.markup.html.tree.ITreeStateListener)public void collapseAll()
ITreeState
collapseAll in interface ITreeStateITreeState.collapseAll()public void collapseNode(Object node)
ITreeState
collapseNode in interface ITreeStatenode - Node to collapsepublic void expandAll()
ITreeState
expandAll in interface ITreeStateITreeState.expandAll()public void expandNode(Object node)
ITreeState
expandNode in interface ITreeStatenode - Node to expandpublic Collection<Object> getSelectedNodes()
ITreeState
getSelectedNodes in interface ITreeStateITreeState.getSelectedNodes()protected void removeSelectedNodeSilent(Object node)
public boolean isAllowSelectMultiple()
ITreeState
isAllowSelectMultiple in interface ITreeStateITreeState.isAllowSelectMultiple()public boolean isNodeExpanded(Object node)
ITreeState
isNodeExpanded in interface ITreeStatenode - The node to inspect
public boolean isNodeSelected(Object node)
ITreeState
isNodeSelected in interface ITreeStatenode - The node to inspect
public void removeTreeStateListener(ITreeStateListener l)
ITreeState
removeTreeStateListener in interface ITreeStatel - The listener to removeITreeState.removeTreeStateListener(org.apache.wicket.markup.html.tree.ITreeStateListener)
public void selectNode(Object node,
boolean selected)
node and calls the corresponding method on all registered
ITreeStateListeners. If isAllowSelectMultiple is false
, any currently selected nodes are deselected.
selectNode in interface ITreeStatenode - the node to be selectedselected - true if node is to be selected, false if node is to be deselectedpublic void setAllowSelectMultiple(boolean value)
ITreeState
setAllowSelectMultiple in interface ITreeStatevalue - If true, multiple nodes can be selected. If false, only one node at a time can be
selectedITreeState.setAllowSelectMultiple(boolean)public void detach()
IDetachable
detach in interface IDetachable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||