All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class improv.event.ImprovObservable

java.lang.Object
   |
   +----improv.event.ImprovObservable

public abstract class ImprovObservable
extends Object
This class is the superclass of all Improv Objects which generate events It is more flexible than the standard Observable class provided in Java. Because it allows each observer to register an object which will be passed back to the observer when an ImprovEvent is generated. An observer may also register itself more than once, providing multiple object arguments.

See Also:
ImprovObserver

Variable Index

 o type

Constructor Index

 o ImprovObservable()

Method Index

 o addObserver(ImprovObserver)
Used to register an ImprovObserver with the ImprovObservable object.
 o addObserver(ImprovObserver, Object)
Used to register an ImprovObserver with the ImprovObservable object.
 o countObservers()
 o deleteObserver(ImprovObserver)
Unregister an observer with this Object.
 o deleteObservers()
 o getType()
 o notifyObservers()

Variables

 o type
 protected int type

Constructors

 o ImprovObservable
 public ImprovObservable()

Methods

 o addObserver
 public final void addObserver(ImprovObserver observer,
                               Object obj)
Used to register an ImprovObserver with the ImprovObservable object.

Parameters:
observer - the ImprovObserver receiving events from this Object.
obj - an optional object which is passed back to the observer when an ImprovEvent is generated.
 o addObserver
 public final void addObserver(ImprovObserver i)
Used to register an ImprovObserver with the ImprovObservable object. The equivelant of addObserver(observer,null).

Parameters:
observer - the ImprovObserver receiving events from this Object.
 o deleteObserver
 public final void deleteObserver(ImprovObserver improvObserver)
Unregister an observer with this Object.

Parameters:
improvObserver - the observer to be unregistered
 o deleteObservers
 public final void deleteObservers()
 o notifyObservers
 public final void notifyObservers()
 o countObservers
 public final int countObservers()
 o getType
 public final int getType()

All Packages  Class Hierarchy  This Package  Previous  Next  Index