|
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 | |||||||||
This interface is a replacement for Observable, because Observable is a class instead of an interface. A Watchable object is essentially a set with no duplicates.
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
| 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()
Notify the watchers. |
void |
notifyWatchers(Object arg)
Notify the watchers. |
void |
notifyWatchersDelete()
Notify the watchers that this object has been deleted. |
void |
notifyWatchersUpdate(Object arg)
Notify the watchers that the object has been changed and the change needs to be handled by the watchers. |
void |
notifyWatchersUpdate(String strProperty,
Object oldVal,
Object newVal)
Notify the watchers that some value has been changed. |
Watcher |
removeWatcher(Watcher w)
Delete a watcher on this object. |
| Method Detail |
public Watcher addWatcher(Watcher w)
w - is the Watcher to add.public int countWatchers()
public Watcher removeWatcher(Watcher w)
public void clearWatchers()
public void disableNotify()
public void enableNotify()
disableNotify()public boolean hasNotifyEnabled()
disableNotify(),
enableNotify()public void notifyWatchers()
public void notifyWatchers(Object arg)
public void notifyWatchersUpdate(Object arg)
arg - is the argument to send to all Watchers.
public void notifyWatchersUpdate(String strProperty,
Object oldVal,
Object newVal)
strProperty - 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 notifyWatchersDelete()
public Object clone()
clone in class Object
|
Copyright Information | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||