public abstract class MouseDragHelper extends java.awt.event.MouseAdapter implements java.awt.event.MouseMotionListener, java.awt.KeyEventDispatcher, Weighted
Modifier and Type | Field and Description |
---|---|
static int |
DRAG_START_DEADZONE |
protected java.awt.Point |
myPressedOnScreenPoint |
Constructor and Description |
---|
MouseDragHelper(Disposable parent,
javax.swing.JComponent dragComponent) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canStartDragging(javax.swing.JComponent dragComponent,
java.awt.Point dragComponentPoint) |
static boolean |
checkModifiers(java.awt.event.InputEvent event) |
boolean |
dispatchKeyEvent(java.awt.event.KeyEvent e) |
double |
getWeight() |
protected boolean |
isDragJustStarted() |
protected boolean |
isDragOut(java.awt.event.MouseEvent event,
java.awt.Point dragToScreenPoint,
java.awt.Point startScreenPoint) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
protected abstract void |
processDrag(java.awt.event.MouseEvent event,
java.awt.Point dragToScreenPoint,
java.awt.Point startScreenPoint) |
protected void |
processDragCancel() |
protected void |
processDragFinish(java.awt.event.MouseEvent event,
boolean willDragOutStart) |
protected void |
processDragOut(java.awt.event.MouseEvent event,
java.awt.Point dragToScreenPoint,
java.awt.Point startScreenPoint,
boolean justStarted) |
protected void |
processDragOutCancel() |
protected void |
processDragOutFinish(java.awt.event.MouseEvent event) |
protected void |
processMousePressed(java.awt.event.MouseEvent event) |
void |
start() |
void |
stop() |
public static final int DRAG_START_DEADZONE
protected java.awt.Point myPressedOnScreenPoint
public MouseDragHelper(Disposable parent, javax.swing.JComponent dragComponent)
public static boolean checkModifiers(java.awt.event.InputEvent event)
public void start()
public void stop()
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class java.awt.event.MouseAdapter
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class java.awt.event.MouseAdapter
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class java.awt.event.MouseAdapter
protected boolean canStartDragging(javax.swing.JComponent dragComponent, java.awt.Point dragComponentPoint)
protected void processMousePressed(java.awt.event.MouseEvent event)
protected void processDragCancel()
protected void processDragFinish(java.awt.event.MouseEvent event, boolean willDragOutStart)
protected void processDragOutFinish(java.awt.event.MouseEvent event)
protected void processDragOutCancel()
protected final boolean isDragJustStarted()
protected abstract void processDrag(java.awt.event.MouseEvent event, java.awt.Point dragToScreenPoint, java.awt.Point startScreenPoint)
protected boolean isDragOut(java.awt.event.MouseEvent event, java.awt.Point dragToScreenPoint, java.awt.Point startScreenPoint)
protected void processDragOut(java.awt.event.MouseEvent event, java.awt.Point dragToScreenPoint, java.awt.Point startScreenPoint, boolean justStarted)
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
mouseMoved
in class java.awt.event.MouseAdapter
public boolean dispatchKeyEvent(java.awt.event.KeyEvent e)
dispatchKeyEvent
in interface java.awt.KeyEventDispatcher