BatchElementChangeSupport Class
- public class BatchElementChangeSupport
extends Object
implements IElementChangeListener
Implements a property change listener that batches up all property change
events so that they can be processed together once all updating is
completed.
Note that this is intended to be used in AWT/Swing. Specifically, it is
assumed that the changes to batch are occuring on the AWT thread.
To use this class, create an instance, add it as a property change
listener on the objects of interest, and add your listener on this.
-
Hierarchy
-
Object
BatchElementChangeSupport
-
All Implemented Interfaces
-
IElementChangeListener
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BatchElementChangeSupport
public BatchElementChangeSupport()
- Creates a new property change batcher.
BatchElementChangeSupport
public BatchElementChangeSupport(IElementChangeListener
listener)
- Creates a new property change batcher and adds the given listener.
addElementChangeListener(IElementChangeListener) Method
public void addElementChangeListener(IElementChangeListener
listener)
Adds the given listener for batch property change events.
disable() Method
public void disable()
Turns off listening for property changes.
elementChange(ElementChangeEvent) Method
public void elementChange(ElementChangeEvent
change)
Adds the given change into the batch.
Parameters
-
change
- The change event object describing the change.
enable() Method
public void enable()
Turns on listening for property changes.
getChangeEvents(ElementChangeEvent) Method
public static Iterator
getChangeEvents(ElementChangeEvent
e)
Retrieves the list of events from a batch event.
getElements(ElementChangeEvent) Method
public static Iterator
getElements(ElementChangeEvent
e)
Returns a list of the sources that changed.
removePropertyChangeListener(IElementChangeListener) Method
public void removePropertyChangeListener(IElementChangeListener
listener)
Removes the given listener for batch property change events.