Package org.fest.swing.input
Class DragAwareEventQueue
java.lang.Object
java.awt.EventQueue
org.fest.swing.input.DragAwareEventQueue
Catches native drop target events, which are normally hidden from AWTEventListeners.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AWTEventListenerprivate final longprivate final NativeDnDIdentifierprivate final Toolkit -
Constructor Summary
ConstructorsConstructorDescriptionDragAwareEventQueue(Toolkit toolkit, long mask, AWTEventListener eventListener) DragAwareEventQueue(Toolkit toolkit, long mask, AWTEventListener eventListener, NativeDnDIdentifier nativeDnd) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDispatch native drag/drop events the same way non-native drags are reported.voidpop()Stops dispatching events using thisEventQueue, only if thisEventQueueis the same as the's system event queue.Toolkitprivate voidrelayDnDEvent(MouseEvent event) Methods inherited from class java.awt.EventQueue
createSecondaryLoop, getCurrentEvent, getMostRecentEventTime, getNextEvent, invokeAndWait, invokeLater, isDispatchThread, peekEvent, peekEvent, postEvent, push
-
Field Details
-
toolkit
-
mask
private final long mask -
eventListener
-
nativeDnd
-
-
Constructor Details
-
DragAwareEventQueue
DragAwareEventQueue(Toolkit toolkit, long mask, AWTEventListener eventListener) -
DragAwareEventQueue
DragAwareEventQueue(Toolkit toolkit, long mask, AWTEventListener eventListener, NativeDnDIdentifier nativeDnd)
-
-
Method Details
-
pop
Stops dispatching events using thisEventQueue, only if thisEventQueueis the same as the's system event queue. Any pending events are transferred to the previousToolkitEventQueuefor processing.- Overrides:
popin classEventQueue- Throws:
EmptyStackException- if no previous push was made on thisEventQueue.
-
dispatchEvent
Dispatch native drag/drop events the same way non-native drags are reported. Enter/Exit are reported with the appropriate source, while drag and release events use the drag source as the source.- Overrides:
dispatchEventin classEventQueue- Parameters:
e- an instance ofjava.awt.AWTEvent.
-
relayDnDEvent
-