APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.swing.plaf.basic

pack-priv Class DragRecognitionSupport

extends Object
Class Inheritance
Imports
java.awt.Toolkit, java.awt.event.*, java.awt.dnd.DragSource, javax.swing.*, sun.awt.dnd.SunDragSourceContextPeer

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.
Author
Shannon Hickey

Nested and Inner Type Summary

Modifier and TypeClass and Description
public 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.

Field Summary

Modifier and TypeField and Description
private JComponent
private MouseEvent
private int
private static DragRecognitionSupport

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
private static synchronized DragRecognitionSupport
getDragRecognitionSupport()

Returns the DragRecognitionSupport instance.

private int
public 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.

public 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.

public 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.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

componentback to summary
private JComponent component
dndArmedEventback to summary
private MouseEvent dndArmedEvent
motionThresholdback to summary
private int motionThreshold
supportback to summary
private static DragRecognitionSupport support

Constructor Detail

DragRecognitionSupportback to summary
pack-priv DragRecognitionSupport()

Method Detail

clearStateback to summary
private void clearState()
getDragRecognitionSupportback to summary
private static synchronized DragRecognitionSupport getDragRecognitionSupport()

Returns the DragRecognitionSupport instance.

mapDragOperationFromModifiersback to summary
private int mapDragOperationFromModifiers(MouseEvent me, TransferHandler th)
mouseDraggedback to summary
public static boolean mouseDragged(MouseEvent me, DragRecognitionSupport.BeforeDrag bd)

Returns whether or not a drag gesture recognition is ongoing.

mouseDraggedImplback to summary
private boolean mouseDraggedImpl(MouseEvent me, DragRecognitionSupport.BeforeDrag bd)

Returns whether or not a drag gesture recognition is ongoing.

mousePressedback to summary
public static boolean mousePressed(MouseEvent me)

Returns whether or not the event is potentially part of a drag sequence.

mousePressedImplback to summary
private boolean mousePressedImpl(MouseEvent me)

Returns whether or not the event is potentially part of a drag sequence.

mouseReleasedback to summary
public static MouseEvent mouseReleased(MouseEvent me)

If a dnd recognition has been going on, return the MouseEvent that started the recognition. Otherwise, return null.

mouseReleasedImplback to summary
private MouseEvent mouseReleasedImpl(MouseEvent me)

If a dnd recognition has been going on, return the MouseEvent that started the recognition. Otherwise, return null.

javax.swing.plaf.basic back to summary

public Interface DragRecognitionSupport.BeforeDrag

Known Direct Implementers
javax.swing.plaf.basic.BasicListUI.Handler, javax.swing.plaf.basic.BasicTableUI.Handler, javax.swing.plaf.basic.BasicTextUI.DragListener, javax.swing.plaf.basic.BasicTreeUI.Handler

This interface allows us to pass in a handler to mouseDragged, so that we can be notified immediately before a drag begins.

Method Summary

Modifier and TypeMethod and Description
public void

Method Detail

dragStartingback to summary
public void dragStarting(MouseEvent me)