public class ConditionalEventPump extends java.lang.Object implements EventPump, EventFilterable
java.awt.EventDispatchThread.pumpEvents(Conditional)
to pump events while a Task is executed.| Modifier and Type | Class and Description |
|---|---|
private class |
ConditionalEventPump.Conditional
Implements the
java.awt.Conditional interface,
that is package private, with a JDK 1.3+ dynamic proxy. |
static class |
ConditionalEventPump.ThrowableHandler
Handler for RuntimeExceptions or Errors thrown during dispatching of AWT events.
|
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.Class |
conditionalClass |
(package private) static boolean |
debug |
private EventFilter |
filter |
private static java.lang.reflect.Method |
pumpEventsMethod |
| Constructor and Description |
|---|
ConditionalEventPump() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canPumpEvent(java.awt.AWTEvent event)
Returns whether this event can be pumped from the EventQueue.
|
EventFilter |
getEventFilter()
Returns the EventFilter
|
private java.awt.EventQueue |
getEventQueue() |
private java.awt.AWTEvent |
getNextEvent() |
protected java.awt.AWTEvent |
peekEvent(java.awt.EventQueue queue)
Peeks the EventQueue for the next event, without removing it.
|
private java.lang.Boolean |
pumpEvent(Task task)
This method is called before an event is got from the EventQueue and dispatched,
to see if pumping of events should continue or not.
|
void |
pumpEvents(Task task)
Pumps AWT events from the standard AWT Event Queue and dispatches the events until the
given
task is completed; must be
called from the Event Dispatch Thread. |
void |
setEventFilter(EventFilter filter)
Sets the EventFilter
|
private java.awt.AWTEvent |
waitForEvent()
Waits until an event is available on the EventQueue.
|
private void |
waitForTask(Task task) |
private static java.lang.Class conditionalClass
private static java.lang.reflect.Method pumpEventsMethod
static final boolean debug
private EventFilter filter
public void setEventFilter(EventFilter filter)
EventFilterablesetEventFilter in interface EventFilterableEventFilterable.getEventFilter()public EventFilter getEventFilter()
EventFilterablegetEventFilter in interface EventFilterableEventFilterable.setEventFilter(foxtrot.pumps.EventFilter)public void pumpEvents(Task task)
EventPumptask is completed; must be
called from the Event Dispatch Thread. pumpEvents in interface EventPumpprivate void waitForTask(Task task)
private java.lang.Boolean pumpEvent(Task task)
protected boolean canPumpEvent(java.awt.AWTEvent event)
private java.awt.EventQueue getEventQueue()
private java.awt.AWTEvent getNextEvent()
private java.awt.AWTEvent waitForEvent()
peekEvent(java.awt.EventQueue) returns null).protected java.awt.AWTEvent peekEvent(java.awt.EventQueue queue)