|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.dnd.DragGestureRecognizer
java.awt.dnd.MouseDragGestureRecognizer
wt.clients.dndMicroApplet.SimpleDragGestureRecognizer
Extends MouseDragGestureRecognizer to make it more responsive to mouse drags. Default implementations require the mouse to be moved by at least 5 pixels, but this often fails for small Java applets and quick drag motions. We thus recognize any and all drags instead.
Note that this class signals drag source support for all standard drag actions (move, copy, and link) and selects the starting action based on the Windows modifiers keys on all platforms.
Field Summary | |
private static int |
MODIFIER_MASK
Bitmask union of shift and control modifiers |
Fields inherited from class java.awt.dnd.MouseDragGestureRecognizer |
|
Fields inherited from class java.awt.dnd.DragGestureRecognizer |
component, dragGestureListener, dragSource, events, sourceActions |
Constructor Summary | |
private |
SimpleDragGestureRecognizer(DragSource dragSource,
Component component,
DragGestureListener listener)
Private constructor which allows all drag actions |
Method Summary | |
private int |
getDragOperationFromModifiers(MouseEvent e)
Determine initial drag action from event modifiers. |
void |
mouseDragged(MouseEvent e)
If the event list was started and not cleared, then a drag gesture is recognized (regardless of the amount of mouse motion involved). |
void |
mouseEntered(MouseEvent e)
No further possibility of drag gesture in progress -- clear event list. |
void |
mouseExited(MouseEvent e)
No further possibility of drag gesture in progress -- clear event list. |
void |
mousePressed(MouseEvent e)
Restarts drag gesture event list as this is a potential trigger event. |
void |
mouseReleased(MouseEvent e)
No further possibility of drag gesture in progress -- clear event list. |
(package private) static void |
register(Component component,
DragGestureListener listener)
Constructs an instance of this class with the given component and listener. |
Methods inherited from class java.awt.dnd.MouseDragGestureRecognizer |
mouseClicked, mouseMoved, registerListeners, unregisterListeners |
Methods inherited from class java.awt.dnd.DragGestureRecognizer |
addDragGestureListener, appendEvent, fireDragGestureRecognized, getComponent, getDragSource, getSourceActions, getTriggerEvent, removeDragGestureListener, resetRecognizer, setComponent, setSourceActions |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final int MODIFIER_MASK
Constructor Detail |
private SimpleDragGestureRecognizer(DragSource dragSource, Component component, DragGestureListener listener)
Method Detail |
static void register(Component component, DragGestureListener listener)
public void mousePressed(MouseEvent e)
public void mouseReleased(MouseEvent e)
public void mouseEntered(MouseEvent e)
public void mouseExited(MouseEvent e)
public void mouseDragged(MouseEvent e)
private int getDragOperationFromModifiers(MouseEvent e)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |