Big AWT patch.

From-SVN: r34976
This commit is contained in:
Bryce McKinlay
2000-07-12 03:32:07 +00:00
committed by Bryce McKinlay
parent 406a65d0db
commit c7a136d3ef
70 changed files with 4838 additions and 277 deletions
+58 -9
View File
@@ -1,20 +1,65 @@
/* Copyright (C) 1999, 2000 Free Software Foundation
This file is part of libjava.
This file is part of libgcj.
This software is copyrighted work licensed under the terms of the
Libjava License. Please consult the file "LIBJAVA_LICENSE" for
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt;
/* A very incomplete placeholder. */
/* Written using on-line Java 2 Platform Standard Edition v1.3 API
* Specification, as well as "The Java Class Libraries", 2nd edition
* (Addison-Wesley, 1998).
* Status: Believed complete and correct, except for the java.awt.Event
* compatibility constructor.
*/
/**
* AWTEvent is the root event class for all AWT events in the JDK 1.1 event
* model. It supercedes the Event class from JDK 1.0.
*/
public abstract class AWTEvent extends java.util.EventObject
{
protected boolean consumed;
protected int id;
/* Event selection masks */
public static final long COMPONENT_EVENT_MASK = 1 << 0,
CONTAINER_EVENT_MASK = 1 << 1,
FOCUS_EVENT_MASK = 1 << 2,
KEY_EVENT_MASK = 1 << 3,
MOUSE_EVENT_MASK = 1 << 4,
MOUSE_MOTION_EVENT_MASK = 1 << 5,
WINDOW_EVENT_MASK = 1 << 6,
ACTION_EVENT_MASK = 1 << 7,
ADJUSTMENT_EVENT_MASK = 1 << 8,
ITEM_EVENT_MASK = 1 << 9,
TEXT_EVENT_MASK = 1 << 10,
INPUT_METHOD_EVENT_MASK = 1 << 11;
/* Additional event selection masks from JDK 1.3 javadocs */
public static final long PAINT_EVENT_MASK = 1 << 13,
INVOCATION_EVENT_MASK = 1 << 14,
HIERARCHY_EVENT_MASK = 1 << 15,
HIERARCHY_BOUNDS_EVENT_MASK = 1 << 16;
public static final int RESERVED_ID_MAX = 0x7cf;
public AWTEvent(Event event)
{
// FIXME??
super(event.target);
this.id = event.id;
}
public AWTEvent(Object source, int id)
{
super(source);
this.id = id;
}
public int getID()
{
return id;
@@ -22,17 +67,21 @@ public abstract class AWTEvent extends java.util.EventObject
public String paramString ()
{
return toString ();
return "";
}
public String toString ()
{
return getClass().getName() + "[" + id + "]";
return getClass().getName() + "[" + paramString() + "] on " + source;
}
public AWTEvent (Object source, int id)
protected void consume()
{
super(source);
this.id = id;
consumed = true;
}
protected boolean isConsumed()
{
return consumed;
}
}