EchoPoint
1.0

echopoint.model
Class DefaultColorSelectionModel

java.lang.Object
  extended byechopoint.model.DefaultColorSelectionModel
All Implemented Interfaces:
ColorSelectionModel, java.io.Serializable

public class DefaultColorSelectionModel
extends java.lang.Object
implements ColorSelectionModel, java.io.Serializable

A generic implementation of ColorSelectionModel.

See Also:
Serialized Form

Field Summary
protected  nextapp.echo.event.ChangeEvent changeEvent
          Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
protected  nextapp.echo.event.EventListenerList listenerList
           
 
Constructor Summary
DefaultColorSelectionModel(nextapp.echo.Color color)
          Initializes the selectedColor to color
 
Method Summary
 void addChangeListener(nextapp.echo.event.ChangeListener l)
          Adds a ChangeListener to the button.
 void fireStateChanged()
          Notifies all listeners that have registered for this event type.
 nextapp.echo.Color getSelectedColor()
           
 void removeChangeListener(nextapp.echo.event.ChangeListener l)
          Removes a ChangeListener from the button.
 void setSelectedColor(nextapp.echo.Color color)
          Sets the model's selected color to color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

changeEvent

protected transient nextapp.echo.event.ChangeEvent changeEvent
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property. The source of events generated here is always "this".


listenerList

protected nextapp.echo.event.EventListenerList listenerList
Constructor Detail

DefaultColorSelectionModel

public DefaultColorSelectionModel(nextapp.echo.Color color)
Initializes the selectedColor to color

Method Detail

addChangeListener

public void addChangeListener(nextapp.echo.event.ChangeListener l)
Adds a ChangeListener to the button.

Specified by:
addChangeListener in interface ColorSelectionModel
Parameters:
l - The ChangeListener to be added.

fireStateChanged

public void fireStateChanged()
Notifies all listeners that have registered for this event type.


getSelectedColor

public nextapp.echo.Color getSelectedColor()
Specified by:
getSelectedColor in interface ColorSelectionModel
See Also:
ColorSelectionModel.getSelectedColor()

removeChangeListener

public void removeChangeListener(nextapp.echo.event.ChangeListener l)
Removes a ChangeListener from the button.

Specified by:
removeChangeListener in interface ColorSelectionModel
Parameters:
l - The ChangeListener to be removed.

setSelectedColor

public void setSelectedColor(nextapp.echo.Color color)
Description copied from interface: ColorSelectionModel
Sets the model's selected color to color. Notifies any listeners if the model changes

Specified by:
setSelectedColor in interface ColorSelectionModel
See Also:
ColorSelectionModel.setSelectedColor(nextapp.echo.Color)

EchoPoint
1.0