# HG changeset patch # User dav # Date 1215432579 -14400 # Node ID c5971dbeaaaac168e834f0e8dd46bb26754cb3b1 # Parent 6a864798b4adb5b20224038e9c850e2cfcaa55d6 6693974: Unify EventQueue$EventQueueItem and SunToolkit.$EventQueueItem classes Reviewed-by: volk, art diff -r 6a864798b4ad -r c5971dbeaaaa jdk/src/share/classes/java/awt/Component.java --- a/jdk/src/share/classes/java/awt/Component.java Thu Jun 19 16:09:22 2008 +0400 +++ b/jdk/src/share/classes/java/awt/Component.java Mon Jul 07 16:09:39 2008 +0400 @@ -5737,7 +5737,7 @@ } } - transient EventQueueItem[] eventCache; + transient sun.awt.EventQueueItem[] eventCache; /** * @see #isCoalescingEnabled diff -r 6a864798b4ad -r c5971dbeaaaa jdk/src/share/classes/java/awt/EventQueue.java --- a/jdk/src/share/classes/java/awt/EventQueue.java Thu Jun 19 16:09:22 2008 +0400 +++ b/jdk/src/share/classes/java/awt/EventQueue.java Mon Jul 07 16:09:39 2008 +0400 @@ -42,6 +42,7 @@ import sun.awt.AWTAutoShutdown; import sun.awt.PeerEvent; import sun.awt.SunToolkit; +import sun.awt.EventQueueItem; /** * EventQueue is a platform-independent class @@ -359,7 +360,7 @@ entry != null; entry = entry.next) { // Give Component.coalesceEvents a chance - if (entry.event.getSource() == source && entry.id == id) { + if (entry.event.getSource() == source && entry.event.getID() == id) { AWTEvent coalescedEvent = source.coalesceEvents( entry.event, e); if (coalescedEvent != null) { @@ -499,7 +500,7 @@ for (EventQueueItem entry = queues[i].head, prev = null; entry != null; prev = entry, entry = entry.next) { - if (entry.id == id) { + if (entry.event.getID() == id) { if (prev == null) { queues[i].head = entry.next; } else { @@ -545,7 +546,7 @@ for (int i = NUM_PRIORITIES - 1; i >= 0; i--) { EventQueueItem q = queues[i].head; for (; q != null; q = q.next) { - if (q.id == id) { + if (q.event.getID() == id) { return q.event; } } @@ -1051,14 +1052,3 @@ EventQueueItem head; EventQueueItem tail; } - -class EventQueueItem { - AWTEvent event; - int id; - EventQueueItem next; - - EventQueueItem(AWTEvent evt) { - event = evt; - id = evt.getID(); - } -} diff -r 6a864798b4ad -r c5971dbeaaaa jdk/src/share/classes/sun/awt/SunToolkit.java --- a/jdk/src/share/classes/sun/awt/SunToolkit.java Thu Jun 19 16:09:22 2008 +0400 +++ b/jdk/src/share/classes/sun/awt/SunToolkit.java Mon Jul 07 16:09:39 2008 +0400 @@ -2039,12 +2039,3 @@ SunToolkit.wakeupEventQueue(eventQueue, event.getSource() == AWTAutoShutdown.getInstance()); } } // class PostEventQueue - -class EventQueueItem { - AWTEvent event; - EventQueueItem next; - - EventQueueItem(AWTEvent evt) { - event = evt; - } -} // class EventQueueItem