charva.awt.event

Class InvocationEvent


public class InvocationEvent
extends AWTEvent

An event which executes the run() method on a Runnable when dispatched by the AWT event dispatcher thread.

Field Summary

protected Object
_notifier
The (possibly null) object whose notifyAll() method will be called as soon as the Runnable's run() method has returned.
protected Runnable
_runnable
The Runnable whose run() method will be called.

Fields inherited from class charva.awt.event.AWTEvent

ACTION_PERFORMED, ADJUSTMENT_EVENT, FOCUS_GAINED, FOCUS_LOST, GARBAGE_COLLECTION, INVOCATION_EVENT, ITEM_STATE_CHANGED, KEY_PRESSED, KEY_TYPED, LIST_SELECTION, MOUSE_EVENT, PAINT_EVENT, RESERVED_ID_MAX, SCROLL_EVENT, SYNC_EVENT, WINDOW_CLOSING, WINDOW_OPENED

Constructor Summary

InvocationEvent(Object source_, Runnable runnable_)
Constructs an InvocationEvent with the specified source which will execute the Runnable's run() method when dispatched by the AWT dispatch thread.
InvocationEvent(Object source_, Runnable runnable_, Object notifier_)
Constructs an InvocationEvent with the specified source which will execute the Runnable's run() method when dispatched by the AWT dispatch thread.

Method Summary

void
dispatch()
Executes the runnable's run() method and then (if the notifier is non-null) calls the notifier's notifyAll() method.

Methods inherited from class charva.awt.event.AWTEvent

getID

Field Details

_notifier

protected Object _notifier
The (possibly null) object whose notifyAll() method will be called as soon as the Runnable's run() method has returned.

_runnable

protected Runnable _runnable
The Runnable whose run() method will be called.

Constructor Details

InvocationEvent

public InvocationEvent(Object source_,
                       Runnable runnable_)
Constructs an InvocationEvent with the specified source which will execute the Runnable's run() method when dispatched by the AWT dispatch thread.
Parameters:
source_ - the source of this event.
runnable_ - the Runnable whose run() method will be called. when the run() method has returned.

InvocationEvent

public InvocationEvent(Object source_,
                       Runnable runnable_,
                       Object notifier_)
Constructs an InvocationEvent with the specified source which will execute the Runnable's run() method when dispatched by the AWT dispatch thread. After the run() method has returned, the notifier's notifyAll() method will be called.
Parameters:
source_ - the source of this event.
runnable_ - the Runnable whose run() method will be called.
notifier_ - the object whose notifyAll() method will be called when the run() method has returned.

Method Details

dispatch

public void dispatch()
Executes the runnable's run() method and then (if the notifier is non-null) calls the notifier's notifyAll() method.