public class DragRecognitionSupport extends Object
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 c&p of core (package private) needed for BasicXListUI. It differs from core in that references to sun packages have been replaced.
Modifier and Type | Class and Description |
---|---|
static interface |
DragRecognitionSupport.BeforeDrag
This interface allows us to pass in a handler to mouseDragged,
so that we can be notified immediately before a drag begins.
|
Modifier and Type | Field and Description |
---|---|
private JComponent |
component |
private MouseEvent |
dndArmedEvent |
private int |
motionThreshold |
Constructor and Description |
---|
DragRecognitionSupport() |
Modifier and Type | Method and Description |
---|---|
private void |
clearState() |
private static DragRecognitionSupport |
getDragRecognitionSupport()
Returns the DragRecognitionSupport for the caller's AppContext.
|
private int |
mapDragOperationFromModifiers(MouseEvent me,
TransferHandler th) |
static boolean |
mouseDragged(MouseEvent me,
DragRecognitionSupport.BeforeDrag bd)
Returns whether or not a drag gesture recognition is ongoing.
|
private boolean |
mouseDraggedImpl(MouseEvent me,
DragRecognitionSupport.BeforeDrag bd)
Returns whether or not a drag gesture recognition is ongoing.
|
static boolean |
mousePressed(MouseEvent me)
Returns whether or not the event is potentially part of a drag sequence.
|
private boolean |
mousePressedImpl(MouseEvent me)
Returns whether or not the event is potentially part of a drag sequence.
|
static MouseEvent |
mouseReleased(MouseEvent me)
If a dnd recognition has been going on, return the MouseEvent
that started the recognition.
|
private MouseEvent |
mouseReleasedImpl(MouseEvent me)
If a dnd recognition has been going on, return the MouseEvent
that started the recognition.
|
private int motionThreshold
private MouseEvent dndArmedEvent
private JComponent component
public DragRecognitionSupport()
private static DragRecognitionSupport getDragRecognitionSupport()
public static boolean mousePressed(MouseEvent me)
public static MouseEvent mouseReleased(MouseEvent me)
public static boolean mouseDragged(MouseEvent me, DragRecognitionSupport.BeforeDrag bd)
private void clearState()
private int mapDragOperationFromModifiers(MouseEvent me, TransferHandler th)
private boolean mousePressedImpl(MouseEvent me)
private MouseEvent mouseReleasedImpl(MouseEvent me)
private boolean mouseDraggedImpl(MouseEvent me, DragRecognitionSupport.BeforeDrag bd)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses