com.extjs.gxt.ui.client.data
Class ChangeEventSupport

java.lang.Object
  extended by com.extjs.gxt.ui.client.data.ChangeEventSupport
All Implemented Interfaces:
ChangeEventSource

public class ChangeEventSupport
extends java.lang.Object
implements ChangeEventSource

Default implementation of the ChangeEventSource interface.


Field Summary
protected  java.util.List<ChangeListener> listeners
           
protected  boolean silent
           
 
Fields inherited from interface com.extjs.gxt.ui.client.data.ChangeEventSource
Add, Remove, Update
 
Constructor Summary
ChangeEventSupport()
           
 
Method Summary
 void addChangeListener(ChangeListener... listener)
          Adds a change listener to the model.
 boolean isSilent()
           
 void notify(ChangeEvent event)
          Notifies listeners of the given change event.
 void removeChangeListener(ChangeListener... listener)
          Removes a change listener.
 void removeChangeListeners()
          Removes all change listeners.
 void setSilent(boolean silent)
          Sets whether change events are fired.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

protected java.util.List<ChangeListener> listeners

silent

protected boolean silent
Constructor Detail

ChangeEventSupport

public ChangeEventSupport()
Method Detail

addChangeListener

public void addChangeListener(ChangeListener... listener)
Description copied from interface: ChangeEventSource
Adds a change listener to the model.

Specified by:
addChangeListener in interface ChangeEventSource
Parameters:
listener - the listener to add

isSilent

public boolean isSilent()

notify

public void notify(ChangeEvent event)
Description copied from interface: ChangeEventSource
Notifies listeners of the given change event.

Specified by:
notify in interface ChangeEventSource
Parameters:
event - the change event

removeChangeListener

public void removeChangeListener(ChangeListener... listener)
Description copied from interface: ChangeEventSource
Removes a change listener.

Specified by:
removeChangeListener in interface ChangeEventSource
Parameters:
listener - the listener to remove

setSilent

public void setSilent(boolean silent)
Description copied from interface: ChangeEventSource
Sets whether change events are fired.

Specified by:
setSilent in interface ChangeEventSource
Parameters:
silent - true to disable change event, otherwise false

removeChangeListeners

public void removeChangeListeners()
Description copied from interface: ChangeEventSource
Removes all change listeners.

Specified by:
removeChangeListeners in interface ChangeEventSource