dsto.dfc.swing.dnd
Class DfcMouseDragGestureRecognizer
java.lang.Object
java.awt.dnd.DragGestureRecognizer
java.awt.dnd.MouseDragGestureRecognizer
dsto.dfc.swing.dnd.DfcMouseDragGestureRecognizer
- All Implemented Interfaces:
- MouseListener, MouseMotionListener, Serializable, EventListener
public class DfcMouseDragGestureRecognizer
- extends MouseDragGestureRecognizer
A simple mouse-based drag gesture recogniser that only triggers
drag and drop actions on MOUSE_DRAGGED events. This can be used to
work around a problem with the mouse gesture recognisers in JDK
1.2.2 and 1.3 that get confused in the case of a
MOUSE_DOWN/MOUSE_EXIT (ie case where MOUSE_UP is not seen after a
MOUSE_DOWN). This happens, for example, when a JTable pops up an
inline editor component (eg a checkbox) in response to a mouse down
event.
- Version:
- $Revision$
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lastPress
protected MouseEvent lastPress
dragging
protected boolean dragging
DfcMouseDragGestureRecognizer
public DfcMouseDragGestureRecognizer(Component component,
int action)
DfcMouseDragGestureRecognizer
public DfcMouseDragGestureRecognizer(DragSource dragSource,
Component component,
int action)
DfcMouseDragGestureRecognizer
public DfcMouseDragGestureRecognizer(DragSource dragSource,
Component component,
int action,
DragGestureListener dgListener)
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressed
in interface MouseListener
- Overrides:
mousePressed
in class MouseDragGestureRecognizer
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased
in interface MouseListener
- Overrides:
mouseReleased
in class MouseDragGestureRecognizer
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDragged
in interface MouseMotionListener
- Overrides:
mouseDragged
in class MouseDragGestureRecognizer
resetRecognizer
public void resetRecognizer()
- Overrides:
resetRecognizer
in class DragGestureRecognizer
distance
protected static final int distance(Point p1,
Point p2)
Copyright © 2008 Commonwealth of Australia