com.guiseframework.model
Class DefaultListSelectModel.ValueState

java.lang.Object
  extended by com.guiseframework.model.DefaultListSelectModel.ValueState
Enclosing class:
DefaultListSelectModel<V>

protected class DefaultListSelectModel.ValueState
extends java.lang.Object

An encapsulation of the state of a value in the model. Value states are considered equal if the value they contain are equal.

Author:
Garret Wilson

Constructor Summary
DefaultListSelectModel.ValueState(V value)
          Constructor
DefaultListSelectModel.ValueState(V value, DefaultListSelectModel.ValueState valueState)
          State copy constructor
 
Method Summary
 boolean equals(java.lang.Object object)
          Indicates whether some other object is "equal to" this one.
 V getValue()
           
 int hashCode()
           
 boolean isDisplayed()
           
 boolean isEnabled()
           
 boolean isSelected()
           
 void setDisplayed(boolean newDisplayed)
          Sets whether this value is displayed.
 void setEnabled(boolean newEnabled)
          Sets whether this value is enabled.
 void setSelected(boolean newSelected)
          Sets whether this value is selected.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultListSelectModel.ValueState

public DefaultListSelectModel.ValueState(V value)
Constructor

Parameters:
value - The model value.

DefaultListSelectModel.ValueState

public DefaultListSelectModel.ValueState(V value,
                                         DefaultListSelectModel.ValueState valueState)
State copy constructor

Parameters:
value - The new model value.
valueState - The existing state containing values to copy.
Method Detail

getValue

public V getValue()
Returns:
The model value.

isDisplayed

public boolean isDisplayed()
Returns:
Whether this value is displayed.

setDisplayed

public void setDisplayed(boolean newDisplayed)
Sets whether this value is displayed.

Parameters:
newDisplayed - true if this value should be displayed.

isEnabled

public boolean isEnabled()
Returns:
Whether this value is enabled.

setEnabled

public void setEnabled(boolean newEnabled)
Sets whether this value is enabled.

Parameters:
newEnabled - true if this value should be enabled.

isSelected

public boolean isSelected()
Returns:
Whether this value is selected.

setSelected

public void setSelected(boolean newSelected)
Sets whether this value is selected.

Parameters:
newSelected - true if this value should be selected.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
A hash code value for the object.

equals

public boolean equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one. This implementation returns whether the the objects contain equal values.

Overrides:
equals in class java.lang.Object
Parameters:
object - The reference object with which to compare.
Returns:
true if this object is equivalent to the given object.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.