com.alee.laf.tree
Class NodeState

java.lang.Object
  extended by com.alee.laf.tree.NodeState
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class NodeState
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Single node state data class.

Author:
Mikle Garin
See Also:
Serialized Form

Field Summary
protected  boolean expanded
          Whether node is expanded or not.
protected  boolean selected
          Whether node is selected or not.
 
Constructor Summary
NodeState()
          Constructs empty node state.
NodeState(boolean expanded, boolean selected)
          Constructs node state with the specified expansion and selection states.
 
Method Summary
protected  NodeState clone()
          Returns cloned node state.
 boolean isExpanded()
          Returns whether node is expanded or not.
 boolean isSelected()
          Returns whether node is selected or not.
 void setExpanded(boolean expanded)
          Sets whether node is expanded or not.
 void setSelected(boolean selected)
          Sets whether node is selected or not.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

expanded

@XStreamAsAttribute
protected boolean expanded
Whether node is expanded or not.


selected

@XStreamAsAttribute
protected boolean selected
Whether node is selected or not.

Constructor Detail

NodeState

public NodeState()
Constructs empty node state.


NodeState

public NodeState(boolean expanded,
                 boolean selected)
Constructs node state with the specified expansion and selection states.

Parameters:
expanded - expansion state
selected - selection state
Method Detail

isExpanded

public boolean isExpanded()
Returns whether node is expanded or not.

Returns:
true if node is expanded, false otherwise

setExpanded

public void setExpanded(boolean expanded)
Sets whether node is expanded or not.

Parameters:
expanded - whether node is expanded or not

isSelected

public boolean isSelected()
Returns whether node is selected or not.

Returns:
true if node is selected, false otherwise

setSelected

public void setSelected(boolean selected)
Sets whether node is selected or not.

Parameters:
selected - whether node is selected or not

clone

protected NodeState clone()
Returns cloned node state.

Overrides:
clone in class java.lang.Object
Returns:
cloned node state