|
JThreadKitTM v1.1.0 ( public members only)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ValueChangeListener is used internally by JThreadKit.
You will only use this interface on rare occasions when
you need to access instances of ValueMonitor that have been
constructed by a superclass you are extending.
|
Used to monitor changes in the value stored in a ValueMonitor.
See addValueChangeListener.
Here's a typical use:
|
ValueMonitor valMon = //...
valMon.addValueChangeListener(new ValueChangeListener() {
public void valueChanged(ValueMonitor valMon, int newValue) {
// Value changed, do something quickly...
// ...
}
});
|
| Method Summary | |
void |
valueChanged(ValueMonitor valMon,
int newValue)
This method is called every time the value stored inside an instance of ValueMonitor changes. |
| Method Detail |
public void valueChanged(ValueMonitor valMon,
int newValue)
ValueMonitor changes. This method is called by
the thread that just changed the value--while calling this method,
this thread continues to hold the exclusive lock on the object
returned by ValueMonitor.getLockObject(). In light of
this, implementations of this method should do their work
quickly (and without making method calls that
potentially block!).valMon - the particular ValueMonitor that
was just changed (a single listener can monitor multiple
instances of ValueMonitor).newValue - the new value as a result of this change (no need
to query the instance).
|
JThreadKitTM v1.1.0 ( public members only)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||