Makefile.in: Rebuilt.
* 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. From-SVN: r33034
This commit is contained in:
parent
3bd835f73f
commit
4eaf5996ad
39 changed files with 1617 additions and 78 deletions
84
libjava/java/awt/event/InvocationEvent.java
Normal file
84
libjava/java/awt/event/InvocationEvent.java
Normal file
|
@ -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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue