|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.berkeley.guir.lib.satin.watch.WatchableImpl
This is a sample implementation of Watchable. It is designed to be used as a delegate class. That is, if you want to implement the Watchable interface but don't want to implement the methods, you can have a WatchableImpl object contained within and just delegate the Watchable methods to this object.
This class is intended to be a delegate, and is not really intended to be subclassed. Calling any of the normal notify methods causes RuntimeExceptions to be thrown, just to let you know you shouldn't be using this class this way.
Revisions: - SATIN-v1.0-1.0.0, Mar 08 1999, JH
Created class
- SATIN-v2.1-1.0.0, Aug 11 2000, JH
Touched for SATIN release
| Constructor Summary | |
WatchableImpl()
|
|
| Method Summary | |
Watcher |
addWatcher(Watcher w)
Add a watcher to this object. |
void |
clearWatchers()
Delete all watchers on this object. |
Object |
clone()
Make a clone of this Watchable object. |
int |
countWatchers()
Count the number of watchers watching this object. |
void |
disableNotify()
Turn off ability to notify others. |
void |
enableNotify()
Turn on ability to notify others. |
boolean |
hasNotifyEnabled()
Check current ability to notify others. |
void |
notifyWatchers()
Throws an exception. |
void |
notifyWatchers(Object arg)
Throws an exception. |
void |
notifyWatchers(Watchable watchable)
|
void |
notifyWatchers(Watchable watchable,
Object arg)
This is a convenience method if this class is used in a delegation fashion. |
void |
notifyWatchersDelete()
Throws an exception. |
void |
notifyWatchersDelete(Watchable watchable)
This is a convenience method if this class is used in a delegation fashion. |
void |
notifyWatchersUpdate(Object arg)
Throws an exception. |
void |
notifyWatchersUpdate(String strProperty,
Object oldVal,
Object newVal)
Throws an exception. |
void |
notifyWatchersUpdate(Watchable watchable)
This is a convenience method if this class is used in a delegation fashion. |
void |
notifyWatchersUpdate(Watchable watchable,
Object arg)
This is a convenience method if this class is used in a delegation fashion. |
void |
notifyWatchersUpdate(Watchable watchable,
String strProperty,
Object oldVal,
Object newVal)
This is a convenience method if this class is used in a delegation fashion. |
Watcher |
removeWatcher(Watcher w)
Delete a watcher on this object. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public WatchableImpl()
| Method Detail |
public Watcher addWatcher(Watcher w)
WatchableaddWatcher in interface Watchableedu.berkeley.guir.lib.satin.watch.Watchablew - is the Watcher to add.public int countWatchers()
WatchablecountWatchers in interface Watchablepublic Watcher removeWatcher(Watcher w)
WatchableremoveWatcher in interface Watchableedu.berkeley.guir.lib.satin.watch.Watchablepublic void clearWatchers()
WatchableclearWatchers in interface Watchablepublic void disableNotify()
WatchabledisableNotify in interface Watchablepublic void enableNotify()
WatchableenableNotify in interface Watchableedu.berkeley.guir.lib.satin.watch.WatchableWatchable.disableNotify()public boolean hasNotifyEnabled()
WatchablehasNotifyEnabled in interface Watchableedu.berkeley.guir.lib.satin.watch.WatchableWatchable.disableNotify(),
Watchable.enableNotify()public void notifyWatchers()
notifyWatchers in interface Watchablepublic void notifyWatchers(Object arg)
notifyWatchers in interface Watchablepublic void notifyWatchers(Watchable watchable)
public void notifyWatchers(Watchable watchable,
Object arg)
watchable - is the Watchable object that will be passed to
the Watcher on the callback.arg - is the generic argument.Watchable.notifyWatchers()public void notifyWatchersUpdate(Object arg)
notifyWatchersUpdate in interface Watchableedu.berkeley.guir.lib.satin.watch.Watchablearg - is the argument to send to all Watchers.
public void notifyWatchersUpdate(String strProperty,
Object oldVal,
Object newVal)
notifyWatchersUpdate in interface Watchableedu.berkeley.guir.lib.satin.watch.WatchablestrProperty - is some agreed upon name for the property.oldVal - is the old value.newVal - is the new value. It should be a clone, not a
reference to the actual value, unless it is
prohibitively expensive to clone. Whether this is a
copy or a reference should be defined in the
SatinConstants file.SatinConstantspublic void notifyWatchersUpdate(Watchable watchable)
watchable - is the Watchable object that will be passed to
the Watcher on the callback.Watchable.notifyWatchersUpdate(Object)
public void notifyWatchersUpdate(Watchable watchable,
Object arg)
watchable - is the Watchable object that will be passed to
the Watcher on the callback.arg - is the argument to send.
public void notifyWatchersUpdate(Watchable watchable,
String strProperty,
Object oldVal,
Object newVal)
watchable - is the Watchable object that will be passed to
the Watcher on the callback.strProperty - is the agreed-upon name of the property.oldVal - is the old value of the property.newVal - is the new value of the property.Watchable.notifyWatchersUpdate(String, Object, Object)public void notifyWatchersDelete()
notifyWatchersDelete in interface Watchablepublic void notifyWatchersDelete(Watchable watchable)
watchable - is the Watchable object that will be passed to
the Watcher on the callback.Watchable.notifyWatchersDelete()public String toString()
toString in class Objectpublic Object clone()
Watchableclone in interface Watchableclone in class Object
|
Copyright Information | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||