public class FormEventQueue extends EventQueue
| Modifier and Type | Field and Description |
|---|---|
static long |
dropEventDefaultTime
default milliseconds to drop events.
|
| Constructor and Description |
|---|
FormEventQueue()
Creates an event queue.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dropEvents(long millis,
Predicate<AWTEvent> eventFilter)
Drops all key events so far up to a given time from now.
Useful for dialogs to prevent accidently ack (usually ENTER) by user. |
void |
dropKeyEvents()
Drops all key events so far up
dropEventDefaultTime ms from now. |
void |
dropMouseEvents()
Drops all mouse events so far up
dropEventDefaultTime ms from now. |
AWTEvent |
getNextEvent() |
createSecondaryLoop, dispatchEvent, getCurrentEvent, getMostRecentEventTime, invokeAndWait, invokeLater, isDispatchThread, peekEvent, peekEvent, pop, postEvent, pushpublic static long dropEventDefaultTime
public void dropEvents(long millis,
Predicate<AWTEvent> eventFilter)
millis - the time in milliseconds to add the current system timeeventFilter - the filter describing the events to droppublic void dropKeyEvents()
dropEventDefaultTime ms from now.public void dropMouseEvents()
dropEventDefaultTime ms from now.public AWTEvent getNextEvent() throws InterruptedException
Overridden to drop keyboard or mouse events.
getNextEvent in class EventQueueInterruptedExceptionTentackle - distributed, domain- and model-driven