summaryrefslogtreecommitdiffstats
path: root/libjava/java/awt/event/InvocationEvent.java
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-09 04:13:27 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-09 04:13:27 +0000
commit61b74eb659b9aa8eb651449180de099dde66e021 (patch)
tree1e2e281864fa888859e506a2a5927e991dbce865 /libjava/java/awt/event/InvocationEvent.java
parentb4e6c2ea572681ecba47a84b19d0f42b5012ff36 (diff)
downloadppe42-gcc-61b74eb659b9aa8eb651449180de099dde66e021.tar.gz
ppe42-gcc-61b74eb659b9aa8eb651449180de099dde66e021.zip
* Makefile.in: Rebuilt.
* Makefile.am (awt_java_source_files): Added new files. * java/awt/IllegalComponentStateException.java: New file. * java/awt/ItemSelectable.java: New file. * java/awt/event/WindowEvent.java: Finished. * java/awt/event/TextEvent.java: Finished. * java/awt/event/ContainerEvent.java: New file. * java/awt/Component.java (getX, getY): New methods. * java/awt/event/PaintEvent.java: New file. * java/awt/event/MouseEvent.java: New file. * java/awt/ActiveEvent.java: New file. * java/awt/event/KeyEvent.java: Finished. * java/awt/event/ItemEvent.java: New file. * java/awt/Adjustable.java: New file. * java/awt/event/InputMethodEvent.java: New file. * java/awt/event/InputEvent.java: Finished. * java/awt/event/FocusEvent.java: New file. * java/awt/event/MouseMotionAdapter.java: New file. * java/awt/event/MouseAdapter.java: New file. * java/awt/event/KeyAdapter.java: New file. * java/awt/event/FocusAdapter.java: New file. * java/awt/event/ContainerAdapter.java: New file. * java/awt/event/ComponentEvent.java: Finished. * java/awt/event/AdjustmentEvent.java: New file. * java/awt/event/ComponentAdapter.java: New file. * java/awt/event/ActionEvent.java: Finished. * java/awt/event/MouseMotionListener.java: New file. * java/awt/event/MouseListener.java: New file. * java/awt/event/ItemListener.java: New file. * java/awt/event/InputMethodListener.java: New file. * java/awt/event/ContainerListener.java: New file. * java/awt/event/FocusListener.java: New file. * java/awt/event/ComponentListener.java: New file. * java/awt/event/AWTEventListener.java: New file. * java/awt/event/AdjustmentListener.java: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33034 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/awt/event/InvocationEvent.java')
-rw-r--r--libjava/java/awt/event/InvocationEvent.java84
1 files changed, 84 insertions, 0 deletions
diff --git a/libjava/java/awt/event/InvocationEvent.java b/libjava/java/awt/event/InvocationEvent.java
new file mode 100644
index 00000000000..522447a7722
--- /dev/null
+++ b/libjava/java/awt/event/InvocationEvent.java
@@ -0,0 +1,84 @@
+/* Copyright (C) 2000 Free Software Foundation
+
+ This file is part of libjava.
+
+This software is copyrighted work licensed under the terms of the
+Libjava License. Please consult the file "LIBJAVA_LICENSE" for
+details. */
+
+package java.awt.event;
+import java.awt.*;
+
+/**
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date April 8, 2000
+ */
+
+/* Status: Still one bug. */
+
+public class InvocationEvent extends AWTEvent implements ActiveEvent
+{
+ public static final int INVOCATION_DEFAULT = 1200;
+ public static final int INVOCATION_FIRST = 1200;
+ public static final int INVOCATION_LAST = 1200;
+
+ protected InvocationEvent (Object source, int id, Runnable runnable,
+ Object notifier, boolean catchExceptions)
+ {
+ super (source, id);
+ this.runnable = runnable;
+ this.notifier = notifier;
+ this.catchExceptions = catchExceptions;
+ }
+
+ public InvocationEvent (Object source, Runnable runnable)
+ {
+ super (source, INVOCATION_DEFAULT);
+ this.runnable = runnable;
+ }
+
+ public InvocationEvent (Object source, Runnable runnable, Object notifier)
+ {
+ super (source, INVOCATION_DEFAULT);
+ this.runnable = runnable;
+ this.notifier = notifier;
+ }
+
+ public void dispatch ()
+ {
+ Exception e = null;
+ try
+ {
+ runnable.run ();
+ }
+ catch (Exception _)
+ {
+ e = _;
+ }
+
+ // FIXME: what to do if !catchExceptions?
+ if (catchExceptions)
+ exception = e;
+
+ if (notifier != null)
+ notifier.notifyAll ();
+ }
+
+ public Exception getException ()
+ {
+ return exception;
+ }
+
+ public String paramString ()
+ {
+ return ("InvocationEvent[" + notifier + "," + runnable
+ + "," + catchExceptions
+ + ";" + super.paramString () + "]");
+ }
+
+ protected boolean catchExceptions;
+ protected Object notifier;
+ protected Runnable runnable;
+
+ private Exception exception;
+}
OpenPOWER on IntegriCloud