EchoPoint
1.0

echopoint.model
Class DefaultExpandableModel

java.lang.Object
  extended byechopoint.model.DefaultExpandableModel
All Implemented Interfaces:
ExpandableModel, java.io.Serializable

public class DefaultExpandableModel
extends java.lang.Object
implements ExpandableModel, java.io.Serializable

A generic implementation of ExpandableModel.

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  boolean isExpanded
           
protected  nextapp.echo.event.EventListenerList listenerList
           
 
Constructor Summary
DefaultExpandableModel(boolean isExpanded)
           
 
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.
 boolean isExpanded()
          Returns the model's expansion.
 void removeChangeListener(nextapp.echo.event.ChangeListener l)
          Removes a ChangeListener from the button.
 void setExpanded(boolean isExpanded)
          Sets the model's expansion
Notifies any listeners if the model changes
 
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".


isExpanded

protected boolean isExpanded

listenerList

protected nextapp.echo.event.EventListenerList listenerList
Constructor Detail

DefaultExpandableModel

public DefaultExpandableModel(boolean isExpanded)
Method Detail

addChangeListener

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

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

fireStateChanged

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


isExpanded

public boolean isExpanded()
Returns the model's expansion.

Specified by:
isExpanded in interface ExpandableModel

removeChangeListener

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

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

setExpanded

public void setExpanded(boolean isExpanded)
Sets the model's expansion
Notifies any listeners if the model changes

Specified by:
setExpanded in interface ExpandableModel

EchoPoint
1.0