home *** CD-ROM | disk | FTP | other *** search
- package java.awt.event;
-
- import java.awt.AWTEvent;
- import java.awt.ActiveEvent;
-
- public class InvocationEvent extends AWTEvent implements ActiveEvent {
- public static final int INVOCATION_FIRST = 1200;
- public static final int INVOCATION_DEFAULT = 1200;
- public static final int INVOCATION_LAST = 1200;
- protected Runnable runnable;
- protected Object notifier;
- protected boolean catchExceptions;
- private Exception exception;
-
- public InvocationEvent(Object var1, Runnable var2) {
- this(var1, var2, (Object)null, false);
- }
-
- public InvocationEvent(Object var1, Runnable var2, Object var3, boolean var4) {
- this(var1, 1200, var2, var3, var4);
- }
-
- protected InvocationEvent(Object var1, int var2, Runnable var3, Object var4, boolean var5) {
- super(var1, var2);
- this.exception = null;
- this.runnable = var3;
- this.notifier = var4;
- this.catchExceptions = var5;
- }
-
- public void dispatch() {
- if (this.catchExceptions) {
- try {
- this.runnable.run();
- } catch (Exception var4) {
- this.exception = var4;
- }
- } else {
- this.runnable.run();
- }
-
- if (this.notifier != null) {
- Object var1 = this.notifier;
- synchronized(var1) {
- this.notifier.notifyAll();
- }
- }
-
- }
-
- public Exception getException() {
- return this.catchExceptions ? this.exception : null;
- }
-
- public String paramString() {
- String var1;
- switch (super.id) {
- case 1200:
- var1 = "INVOCATION_DEFAULT";
- break;
- default:
- var1 = "unknown type";
- }
-
- return var1 + ",runnable=" + this.runnable + ",notifier=" + this.notifier + ",catchExceptions=" + this.catchExceptions;
- }
- }
-