summaryrefslogtreecommitdiff
path: root/java/awt/EventQueue.java
diff options
context:
space:
mode:
authorRoman Kennke <roman@kennke.org>2006-02-28 11:27:14 +0000
committerRoman Kennke <roman@kennke.org>2006-02-28 11:27:14 +0000
commit0781ca65789cd99c64978b01d6b0f992820dcc0b (patch)
tree289e4d70c96a23236781f37a6165ccf7829d8f68 /java/awt/EventQueue.java
parent8d680fa52f417a54824c4e160e588840800ce16f (diff)
downloadclasspath-0781ca65789cd99c64978b01d6b0f992820dcc0b.tar.gz
2006-02-28 Roman Kennke <kennke@aicas.com>
* java/awt/Component.java (dispatchEventImpl): Let the Toolkit dispatch global events. * java/awt/Container.java (dispatchEventImpl): Let the LightweightDispatcher handle events first. * java/awt/EventQueue.java (dispatchEvent): Don't do the global event dispatching here. This is moved to the Component. (globalDispatchEvent): Moved this method to Toolkit. * java/awt/LightweightDispatcher.java (instances): New field. (getInstance): New method. Delivers an instance of LightweightDispatcher. (LightweightDispatcher): Made default constructor private. (dispatchEvent): New method. Replaces the eventDispatched method. This now returns true when the event was actually dispatched. (eventDispatched): Replaced by dispatchEvent. (handleMouseEvent): Send MOUSE_CLICKED to the same component that received the last MOUSE_RELEASED. * java/awt/Toolkit.java (Toolkit): Don't register LightweightDispatcher as global event handler. (globalDispatchEvent): Moved here from EventQueue.
Diffstat (limited to 'java/awt/EventQueue.java')
-rw-r--r--java/awt/EventQueue.java22
1 files changed, 0 insertions, 22 deletions
diff --git a/java/awt/EventQueue.java b/java/awt/EventQueue.java
index 72dcf7046..235ad2ac1 100644
--- a/java/awt/EventQueue.java
+++ b/java/awt/EventQueue.java
@@ -38,7 +38,6 @@ exception statement from your version. */
package java.awt;
-import java.awt.event.AWTEventListenerProxy;
import java.awt.event.ActionEvent;
import java.awt.event.InputEvent;
import java.awt.event.InputMethodEvent;
@@ -460,8 +459,6 @@ public class EventQueue
else if (evt instanceof InvocationEvent)
lastWhen = ((InvocationEvent) evt).getWhen();
- globalDispatchEvent(evt);
-
if (evt instanceof ActiveEvent)
{
ActiveEvent active_evt = (ActiveEvent) evt;
@@ -485,25 +482,6 @@ public class EventQueue
}
/**
- * Dispatches events to listeners registered to the current Toolkit.
- *
- * @param ev the event to dispatch
- */
- private void globalDispatchEvent(AWTEvent ev)
- {
- Toolkit toolkit = Toolkit.getDefaultToolkit();
- // We do not use the accessor methods here because they create new
- // arrays each time. We must be very efficient, so we access this directly.
- AWTEventListenerProxy[] l = toolkit.awtEventListeners;
- for (int i = 0; i < l.length; ++i)
- {
- AWTEventListenerProxy proxy = l[i];
- if ((proxy.getEventMask() & AWTEvent.eventIdToMask(ev.getID())) != 0)
- proxy.eventDispatched(ev);
- }
- }
-
- /**
* Returns the timestamp of the most recent event that had a timestamp, or
* the initialization time of the event queue if no events have been fired.
* At present, only <code>InputEvent</code>s, <code>ActionEvent</code>s,