org.scopemvc.model.basic
Class ModelChangeEventSupport

java.lang.Object
  |
  +--org.scopemvc.model.basic.ModelChangeEventSupport

public class ModelChangeEventSupport
extends java.lang.Object

Delegate to help ModelChangeEvent listener registration and firing. Used by BasicModel. Events are fired synchronously in this implementation.

Version:
$Revision: 1.10 $ $Date: 2002/09/05 15:41:46 $
Author:
Steve Meyfroidt
See Also:
BasicModel

Constructor Summary
ModelChangeEventSupport(ModelChangeEventSource inSource)
          Constructor for the ModelChangeEventSupport object
 
Method Summary
 void activateModel()
          Disable ModelChangeEvent broadcasting for a Model.
 void addModelChangeListener(ModelChangeListener inListener)
          Register a ModelChangeListener to receive ModelChangeEvent broadcasts from the passed Model.
 void deactivateModel()
          Enable ModelChangeEvent broadcasting for a Model that was disabled.
 void fireModelChange(int inType, Selector inSelector)
          Fire a ModelChangeEvent to all listeners
 boolean isModelDeactivated()
          Returns true if the model is deactivated
 void removeModelChangeListener(ModelChangeListener inListener)
          Remove a ModelChangeListener from the set of registered listeners to the passed Model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelChangeEventSupport

public ModelChangeEventSupport(ModelChangeEventSource inSource)
Constructor for the ModelChangeEventSupport object

Parameters:
inSource - The source of ModelChangeEvents
Method Detail

isModelDeactivated

public boolean isModelDeactivated()
Returns true if the model is deactivated

Returns:
true if the model is deactivated

activateModel

public final void activateModel()
Disable ModelChangeEvent broadcasting for a Model. This can 'stack' multiple inactivation requests, allowing nested inactivations.

See Also:
BasicModel.makeActive(boolean)

deactivateModel

public final void deactivateModel()
Enable ModelChangeEvent broadcasting for a Model that was disabled. This can 'stack' multiple activation requests, allowing nested activations.

See Also:
BasicModel.makeActive(boolean)

addModelChangeListener

public void addModelChangeListener(ModelChangeListener inListener)
Register a ModelChangeListener to receive ModelChangeEvent broadcasts from the passed Model.

Parameters:
inListener - the ModelChangeEvent listener to register with the Model to receive its ModelChangeEvent broadcasts.
See Also:
BasicModel.addModelChangeListener(org.scopemvc.core.ModelChangeListener)

removeModelChangeListener

public void removeModelChangeListener(ModelChangeListener inListener)
Remove a ModelChangeListener from the set of registered listeners to the passed Model. The passed listener must be registered as a listener to the Model.

Parameters:
inListener - the ModelChangeListener to deregister from the passed Model.
See Also:
BasicModel.removeModelChangeListener(org.scopemvc.core.ModelChangeListener)

fireModelChange

public void fireModelChange(int inType,
                            Selector inSelector)
Fire a ModelChangeEvent to all listeners

Parameters:
inSelector - The Selector for the property of the model affected by the change
inType - TODO: Describe the Parameter


Copyright © 2000-2002 The Scope Team. All Rights Reserved.