Class DragRecognitionSupport
java.lang.Object
org.jdesktop.swingx.plaf.basic.core.DragRecognitionSupport
Drag gesture recognition support for classes that have a
TransferHandler
. The gesture for a drag in this class is a mouse
press followed by movement by DragSource.getDragThreshold()
pixels. An instance of this class is maintained per AppContext, and the
public static methods call into the appropriate instance. This is a cinvalid input: '&p' of core (package private) needed for BasicXListUI. It differs from core in that references to sun packages have been replaced.
- a static method of SunDragSourceContextPeer has been copied into SwingXUtilities and is used here
- the shared instance of this class is maintained in the UIManager instead of per appContext.
- Version:
- 1.2 11/17/05
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
This interface allows us to pass in a handler to mouseDragged, so that we can be notified immediately before a drag begins. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private static DragRecognitionSupport
Returns the DragRecognitionSupport for the caller's AppContext.private int
static boolean
Returns whether or not a drag gesture recognition is ongoing.private boolean
Returns whether or not a drag gesture recognition is ongoing.static boolean
Returns whether or not the event is potentially part of a drag sequence.private boolean
Returns whether or not the event is potentially part of a drag sequence.static MouseEvent
If a dnd recognition has been going on, return the MouseEvent that started the recognition.private MouseEvent
If a dnd recognition has been going on, return the MouseEvent that started the recognition.
-
Field Details
-
motionThreshold
private int motionThreshold -
dndArmedEvent
-
component
-
-
Constructor Details
-
DragRecognitionSupport
public DragRecognitionSupport()
-
-
Method Details
-
getDragRecognitionSupport
Returns the DragRecognitionSupport for the caller's AppContext. -
mousePressed
Returns whether or not the event is potentially part of a drag sequence. -
mouseReleased
If a dnd recognition has been going on, return the MouseEvent that started the recognition. Otherwise, return null. -
mouseDragged
Returns whether or not a drag gesture recognition is ongoing. -
clearState
private void clearState() -
mapDragOperationFromModifiers
-
mousePressedImpl
Returns whether or not the event is potentially part of a drag sequence. -
mouseReleasedImpl
If a dnd recognition has been going on, return the MouseEvent that started the recognition. Otherwise, return null. -
mouseDraggedImpl
Returns whether or not a drag gesture recognition is ongoing.
-