foxtrot.pumps
Class SunJDK140ConditionalEventPump

java.lang.Object
  extended by foxtrot.pumps.ConditionalEventPump
      extended by foxtrot.pumps.SunJDK14ConditionalEventPump
          extended by foxtrot.pumps.SunJDK140ConditionalEventPump
All Implemented Interfaces:
EventPump, EventFilterable

public class SunJDK140ConditionalEventPump
extends SunJDK14ConditionalEventPump

Specialized ConditionalEventPump for Sun's JDK 1.4.0. This class used to implement a workaround for bug #4531693. It is strongly recommended to upgrade to newer JDK versions.

Version:
$Revision: 255 $

Nested Class Summary
 
Nested classes/interfaces inherited from class foxtrot.pumps.ConditionalEventPump
ConditionalEventPump.ThrowableHandler
 
Constructor Summary
SunJDK140ConditionalEventPump()
           
 
Method Summary
protected  boolean canPumpEvent(AWTEvent event)
          Returns whether this event can be pumped from the EventQueue.
 
Methods inherited from class foxtrot.pumps.SunJDK14ConditionalEventPump
waitForEvent
 
Methods inherited from class foxtrot.pumps.ConditionalEventPump
getEventFilter, getEventQueue, peekEvent, pumpEvents, setEventFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SunJDK140ConditionalEventPump

public SunJDK140ConditionalEventPump()
Method Detail

canPumpEvent

protected boolean canPumpEvent(AWTEvent event)
Description copied from class: ConditionalEventPump
Returns whether this event can be pumped from the EventQueue. JDK 1.4 introduced SequencedEvent, which is an event holding a list SequencedEvents that should be dispatched in order. Bug #4531693 was caused by the fact that the first SequencedEvent of a list, when dispatched, might end up calling an event listener that displayed a dialog (or called Foxtrot, that uses the same event pumping mechanism); the new event pump might try to dispatch the SequencedEvent second in the list (while the first wasn't completely dispatched yet), causing the application to hang. Bug #4531693 has been fixed in JDK 1.4.2, and backported to 1.4.1, but seems to be sneaking in again in JDK 5 and JDK 6.

Overrides:
canPumpEvent in class ConditionalEventPump


Copyright © 2011 KnowledgePlaza. All Rights Reserved.