@XStreamConverter(value=TreeStateConverter.class) public class TreeState extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable
TreeUtils,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,NodeState> |
states
Tree node states.
|
| Constructor and Description |
|---|
TreeState()
Constructs new object instance with empty states.
|
TreeState(java.util.Map<java.lang.String,NodeState> states)
Constructs new object instance with specified states.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addState(java.lang.String nodeId,
boolean expanded,
boolean selected)
Adds node state.
|
TreeState |
clone()
Returns cloned tree state.
|
java.util.Map<java.lang.String,NodeState> |
getStates()
Returns all node states.
|
boolean |
isExpanded(java.lang.String nodeId)
Returns whether node with the specified ID is expanded or not.
|
boolean |
isSelected(java.lang.String nodeId)
Returns whether node with the specified ID is selected or not.
|
void |
setStates(java.util.Map<java.lang.String,NodeState> states)
Sets all node states.
|
protected java.util.Map<java.lang.String,NodeState> states
public TreeState()
public TreeState(java.util.Map<java.lang.String,NodeState> states)
states - node statespublic java.util.Map<java.lang.String,NodeState> getStates()
public void setStates(java.util.Map<java.lang.String,NodeState> states)
states - all node statespublic void addState(java.lang.String nodeId,
boolean expanded,
boolean selected)
nodeId - node IDexpanded - expansion stateselected - selection statepublic boolean isExpanded(java.lang.String nodeId)
nodeId - node IDpublic boolean isSelected(java.lang.String nodeId)
nodeId - node IDpublic TreeState clone()
clone in class java.lang.Object