com.levigo.util.swing.dnd
Class BasicDragGestureRecognizer

java.lang.Object
  extended by com.levigo.util.swing.dnd.BasicDragGestureRecognizer

public class BasicDragGestureRecognizer
extends Object

A simple replacement for the non-accessible javax.swing.plaf.basic.DragRecognitionSupport class.


Nested Class Summary
static interface BasicDragGestureRecognizer.BeforeDrag
          This interface must be implemented by classes wishing to receive a notification before a drag gesture starts.
 
Constructor Summary
BasicDragGestureRecognizer()
           
 
Method Summary
protected  int getDragGestureMotionThreshold()
           
protected  int getDragOperationType(MouseEvent me, TransferHandler th)
           
 int getDragThreshold()
           
protected  int getOperationType(int modifiers, int supportedActions)
           
 boolean mouseDragged(MouseEvent me, BasicDragGestureRecognizer.BeforeDrag bd)
          Handle a mouse drag.
 boolean mousePressed(MouseEvent me)
          Handle a mouse press.
 MouseEvent mouseReleased(MouseEvent me)
          Handle a mouse release.
 void setDragThreshold(int dragThreshold)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicDragGestureRecognizer

public BasicDragGestureRecognizer()
Method Detail

getDragOperationType

protected int getDragOperationType(MouseEvent me,
                                   TransferHandler th)

getOperationType

protected int getOperationType(int modifiers,
                               int supportedActions)

mousePressed

public boolean mousePressed(MouseEvent me)
Handle a mouse press.

Parameters:
me - the mouse event
Returns:
whether the mouse press might be a part of a drag gesture.

getDragGestureMotionThreshold

protected int getDragGestureMotionThreshold()

mouseReleased

public MouseEvent mouseReleased(MouseEvent me)
Handle a mouse release.

Parameters:
me -
Returns:
if a drag gesture was recognized, the mouse-down event initiating it is returned.

mouseDragged

public boolean mouseDragged(MouseEvent me,
                            BasicDragGestureRecognizer.BeforeDrag bd)
Handle a mouse drag.

Parameters:
me -
bd -
Returns:
true if a drag gesture was recognized, false otherwise.

setDragThreshold

public void setDragThreshold(int dragThreshold)

getDragThreshold

public int getDragThreshold()


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.