java.awt.dnd
Class MouseDragGestureRecognizer

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.dnd.DragGestureRecognizer sample code for java.awt.dnd.DragGestureRecognizer definition code for java.awt.dnd.DragGestureRecognizer 
      extended by java.awt.dnd.MouseDragGestureRecognizer
All Implemented Interfaces:
MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener , MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , EventListener sample code for java.util.EventListener definition code for java.util.EventListener

public abstract class MouseDragGestureRecognizer
extends DragGestureRecognizer sample code for java.awt.dnd.DragGestureRecognizer definition code for java.awt.dnd.DragGestureRecognizer
implements MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener , MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener

This abstract subclass of DragGestureRecognizer defines a DragGestureRecognizer for mouse-based gestures. Each platform implements its own concrete subclass of this class, available via the Toolkit.createDragGestureRecognizer() method, to encapsulate the recognition of the platform dependent mouse gesture(s) that initiate a Drag and Drop operation.

Mouse drag gesture recognizers should honor the drag gesture motion threshold, available through DragSource.getDragThreshold() sample code for java.awt.dnd.DragSource.getDragThreshold() definition code for java.awt.dnd.DragSource.getDragThreshold() . A drag gesture should be recognized only when the distance in either the horizontal or vertical direction between the location of the latest mouse dragged event and the location of the corresponding mouse button pressed event is greater than the drag gesture motion threshold.

Drag gesture recognizers created with DragSource.createDefaultDragGestureRecognizer(java.awt.Component, int, java.awt.dnd.DragGestureListener) sample code for java.awt.dnd.DragSource.createDefaultDragGestureRecognizer(java.awt.Component, int, java.awt.dnd.DragGestureListener) definition code for java.awt.dnd.DragSource.createDefaultDragGestureRecognizer(java.awt.Component, int, java.awt.dnd.DragGestureListener) follow this convention.

See Also:
DragGestureListener sample code for java.awt.dnd.DragGestureListener definition code for java.awt.dnd.DragGestureListener , DragGestureEvent sample code for java.awt.dnd.DragGestureEvent definition code for java.awt.dnd.DragGestureEvent , DragSource sample code for java.awt.dnd.DragSource definition code for java.awt.dnd.DragSource , Serialized Form

Field Summary
 
Fields inherited from class java.awt.dnd.DragGestureRecognizer sample code for java.awt.dnd.DragGestureRecognizer definition code for java.awt.dnd.DragGestureRecognizer
component sample code for java.awt.dnd.DragGestureRecognizer.component definition code for java.awt.dnd.DragGestureRecognizer.component , dragGestureListener sample code for java.awt.dnd.DragGestureRecognizer.dragGestureListener definition code for java.awt.dnd.DragGestureRecognizer.dragGestureListener , dragSource sample code for java.awt.dnd.DragGestureRecognizer.dragSource definition code for java.awt.dnd.DragGestureRecognizer.dragSource , events sample code for java.awt.dnd.DragGestureRecognizer.events definition code for java.awt.dnd.DragGestureRecognizer.events , sourceActions sample code for java.awt.dnd.DragGestureRecognizer.sourceActions definition code for java.awt.dnd.DragGestureRecognizer.sourceActions
 
Constructor Summary
protected MouseDragGestureRecognizer sample code for java.awt.dnd.MouseDragGestureRecognizer.MouseDragGestureRecognizer(java.awt.dnd.DragSource) definition code for java.awt.dnd.MouseDragGestureRecognizer.MouseDragGestureRecognizer(java.awt.dnd.DragSource) (DragSource sample code for java.awt.dnd.DragSource definition code for java.awt.dnd.DragSource  ds)
          Construct a new MouseDragGestureRecognizer given the DragSource for the Component.
protected MouseDragGestureRecognizer sample code for java.awt.dnd.MouseDragGestureRecognizer.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component) definition code for java.awt.dnd.MouseDragGestureRecognizer.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component) (DragSource sample code for java.awt.dnd.DragSource definition code for java.awt.dnd.DragSource  ds, Component sample code for java.awt.Component definition code for java.awt.Component  c)
          Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, and the Component to observe.
protected MouseDragGestureRecognizer sample code for java.awt.dnd.MouseDragGestureRecognizer.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component, int) definition code for java.awt.dnd.MouseDragGestureRecognizer.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component, int) (DragSource sample code for java.awt.dnd.DragSource definition code for java.awt.dnd.DragSource  ds, Component sample code for java.awt.Component definition code for java.awt.Component  c, int act)
          Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, and the action(s) permitted for this drag operation.
protected MouseDragGestureRecognizer sample code for java.awt.dnd.MouseDragGestureRecognizer.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component, int, java.awt.dnd.DragGestureListener) definition code for java.awt.dnd.MouseDragGestureRecognizer.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component, int, java.awt.dnd.DragGestureListener) (DragSource sample code for java.awt.dnd.DragSource definition code for java.awt.dnd.DragSource  ds, Component sample code for java.awt.Component definition code for java.awt.Component  c, int act, DragGestureListener sample code for java.awt.dnd.DragGestureListener definition code for java.awt.dnd.DragGestureListener  dgl)
          Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, the action(s) permitted for this drag operation, and the DragGestureListener to notify when a drag gesture is detected.
 
Method Summary
 void mouseClicked sample code for java.awt.dnd.MouseDragGestureRecognizer.mouseClicked(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mouseClicked(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when the mouse has been clicked on a component.
 void mouseDragged sample code for java.awt.dnd.MouseDragGestureRecognizer.mouseDragged(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mouseDragged(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when a mouse button is pressed on a component.
 void mouseEntered sample code for java.awt.dnd.MouseDragGestureRecognizer.mouseEntered(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mouseEntered(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when the mouse enters a component.
 void mouseExited sample code for java.awt.dnd.MouseDragGestureRecognizer.mouseExited(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mouseExited(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when the mouse exits a component.
 void mouseMoved sample code for java.awt.dnd.MouseDragGestureRecognizer.mouseMoved(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mouseMoved(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when the mouse button has been moved on a component (with no buttons no down).
 void mousePressed sample code for java.awt.dnd.MouseDragGestureRecognizer.mousePressed(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mousePressed(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when a mouse button has been pressed on a Component.
 void mouseReleased sample code for java.awt.dnd.MouseDragGestureRecognizer.mouseReleased(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mouseReleased(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when a mouse button has been released on a component.
protected  void registerListeners sample code for java.awt.dnd.MouseDragGestureRecognizer.registerListeners() definition code for java.awt.dnd.MouseDragGestureRecognizer.registerListeners() ()
          register this DragGestureRecognizer's Listeners with the Component
protected  void unregisterListeners sample code for java.awt.dnd.MouseDragGestureRecognizer.unregisterListeners() definition code for java.awt.dnd.MouseDragGestureRecognizer.unregisterListeners() ()
          unregister this DragGestureRecognizer's Listeners with the Component subclasses must override this method
 
Methods inherited from class java.awt.dnd.DragGestureRecognizer sample code for java.awt.dnd.DragGestureRecognizer definition code for java.awt.dnd.DragGestureRecognizer
addDragGestureListener sample code for java.awt.dnd.DragGestureRecognizer.addDragGestureListener(java.awt.dnd.DragGestureListener) definition code for java.awt.dnd.DragGestureRecognizer.addDragGestureListener(java.awt.dnd.DragGestureListener) , appendEvent sample code for java.awt.dnd.DragGestureRecognizer.appendEvent(java.awt.event.InputEvent) definition code for java.awt.dnd.DragGestureRecognizer.appendEvent(java.awt.event.InputEvent) , fireDragGestureRecognized sample code for java.awt.dnd.DragGestureRecognizer.fireDragGestureRecognized(int, java.awt.Point) definition code for java.awt.dnd.DragGestureRecognizer.fireDragGestureRecognized(int, java.awt.Point) , getComponent sample code for java.awt.dnd.DragGestureRecognizer.getComponent() definition code for java.awt.dnd.DragGestureRecognizer.getComponent() , getDragSource sample code for java.awt.dnd.DragGestureRecognizer.getDragSource() definition code for java.awt.dnd.DragGestureRecognizer.getDragSource() , getSourceActions sample code for java.awt.dnd.DragGestureRecognizer.getSourceActions() definition code for java.awt.dnd.DragGestureRecognizer.getSourceActions() , getTriggerEvent sample code for java.awt.dnd.DragGestureRecognizer.getTriggerEvent() definition code for java.awt.dnd.DragGestureRecognizer.getTriggerEvent() , removeDragGestureListener sample code for java.awt.dnd.DragGestureRecognizer.removeDragGestureListener(java.awt.dnd.DragGestureListener) definition code for java.awt.dnd.DragGestureRecognizer.removeDragGestureListener(java.awt.dnd.DragGestureListener) , resetRecognizer sample code for java.awt.dnd.DragGestureRecognizer.resetRecognizer() definition code for java.awt.dnd.DragGestureRecognizer.resetRecognizer() , setComponent sample code for java.awt.dnd.DragGestureRecognizer.setComponent(java.awt.Component) definition code for java.awt.dnd.DragGestureRecognizer.setComponent(java.awt.Component) , setSourceActions sample code for java.awt.dnd.DragGestureRecognizer.setSourceActions(int) definition code for java.awt.dnd.DragGestureRecognizer.setSourceActions(int)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

MouseDragGestureRecognizer sample code for java.awt.dnd.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component, int, java.awt.dnd.DragGestureListener) definition code for java.awt.dnd.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component, int, java.awt.dnd.DragGestureListener)

protected MouseDragGestureRecognizer(DragSource sample code for java.awt.dnd.DragSource definition code for java.awt.dnd.DragSource  ds,
                                     Component sample code for java.awt.Component definition code for java.awt.Component  c,
                                     int act,
                                     DragGestureListener sample code for java.awt.dnd.DragGestureListener definition code for java.awt.dnd.DragGestureListener  dgl)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, the action(s) permitted for this drag operation, and the DragGestureListener to notify when a drag gesture is detected.

Parameters:
ds - The DragSource for the Component c
c - The Component to observe
act - The actions permitted for this Drag
dgl - The DragGestureListener to notify when a gesture is detected

MouseDragGestureRecognizer sample code for java.awt.dnd.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component, int) definition code for java.awt.dnd.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component, int)

protected MouseDragGestureRecognizer(DragSource sample code for java.awt.dnd.DragSource definition code for java.awt.dnd.DragSource  ds,
                                     Component sample code for java.awt.Component definition code for java.awt.Component  c,
                                     int act)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, and the action(s) permitted for this drag operation.

Parameters:
ds - The DragSource for the Component c
c - The Component to observe
act - The actions permitted for this drag

MouseDragGestureRecognizer sample code for java.awt.dnd.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component) definition code for java.awt.dnd.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component)

protected MouseDragGestureRecognizer(DragSource sample code for java.awt.dnd.DragSource definition code for java.awt.dnd.DragSource  ds,
                                     Component sample code for java.awt.Component definition code for java.awt.Component  c)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, and the Component to observe.

Parameters:
ds - The DragSource for the Component c
c - The Component to observe

MouseDragGestureRecognizer sample code for java.awt.dnd.MouseDragGestureRecognizer(java.awt.dnd.DragSource) definition code for java.awt.dnd.MouseDragGestureRecognizer(java.awt.dnd.DragSource)

protected MouseDragGestureRecognizer(DragSource sample code for java.awt.dnd.DragSource definition code for java.awt.dnd.DragSource  ds)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component.

Parameters:
ds - The DragSource for the Component
Method Detail

registerListeners sample code for java.awt.dnd.MouseDragGestureRecognizer.registerListeners() definition code for java.awt.dnd.MouseDragGestureRecognizer.registerListeners()

protected void registerListeners()
register this DragGestureRecognizer's Listeners with the Component

Specified by:
registerListeners sample code for java.awt.dnd.DragGestureRecognizer.registerListeners() definition code for java.awt.dnd.DragGestureRecognizer.registerListeners() in class DragGestureRecognizer sample code for java.awt.dnd.DragGestureRecognizer definition code for java.awt.dnd.DragGestureRecognizer

unregisterListeners sample code for java.awt.dnd.MouseDragGestureRecognizer.unregisterListeners() definition code for java.awt.dnd.MouseDragGestureRecognizer.unregisterListeners()

protected void unregisterListeners()
unregister this DragGestureRecognizer's Listeners with the Component subclasses must override this method

Specified by:
unregisterListeners sample code for java.awt.dnd.DragGestureRecognizer.unregisterListeners() definition code for java.awt.dnd.DragGestureRecognizer.unregisterListeners() in class DragGestureRecognizer sample code for java.awt.dnd.DragGestureRecognizer definition code for java.awt.dnd.DragGestureRecognizer

mouseClicked sample code for java.awt.dnd.MouseDragGestureRecognizer.mouseClicked(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mouseClicked(java.awt.event.MouseEvent)

public void mouseClicked(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Invoked when the mouse has been clicked on a component.

Specified by:
mouseClicked sample code for java.awt.event.MouseListener.mouseClicked(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseClicked(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener
Parameters:
e - the MouseEvent

mousePressed sample code for java.awt.dnd.MouseDragGestureRecognizer.mousePressed(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mousePressed(java.awt.event.MouseEvent)

public void mousePressed(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Invoked when a mouse button has been pressed on a Component.

Specified by:
mousePressed sample code for java.awt.event.MouseListener.mousePressed(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mousePressed(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener
Parameters:
e - the MouseEvent

mouseReleased sample code for java.awt.dnd.MouseDragGestureRecognizer.mouseReleased(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mouseReleased(java.awt.event.MouseEvent)

public void mouseReleased(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Invoked when a mouse button has been released on a component.

Specified by:
mouseReleased sample code for java.awt.event.MouseListener.mouseReleased(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseReleased(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener
Parameters:
e - the MouseEvent

mouseEntered sample code for java.awt.dnd.MouseDragGestureRecognizer.mouseEntered(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mouseEntered(java.awt.event.MouseEvent)

public void mouseEntered(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Invoked when the mouse enters a component.

Specified by:
mouseEntered sample code for java.awt.event.MouseListener.mouseEntered(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseEntered(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener
Parameters:
e - the MouseEvent

mouseExited sample code for java.awt.dnd.MouseDragGestureRecognizer.mouseExited(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mouseExited(java.awt.event.MouseEvent)

public void mouseExited(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Invoked when the mouse exits a component.

Specified by:
mouseExited sample code for java.awt.event.MouseListener.mouseExited(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseExited(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener
Parameters:
e - the MouseEvent

mouseDragged sample code for java.awt.dnd.MouseDragGestureRecognizer.mouseDragged(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mouseDragged(java.awt.event.MouseEvent)

public void mouseDragged(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Invoked when a mouse button is pressed on a component.

Specified by:
mouseDragged sample code for java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent) definition code for java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent) in interface MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener
Parameters:
e - the MouseEvent

mouseMoved sample code for java.awt.dnd.MouseDragGestureRecognizer.mouseMoved(java.awt.event.MouseEvent) definition code for java.awt.dnd.MouseDragGestureRecognizer.mouseMoved(java.awt.event.MouseEvent)

public void mouseMoved(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Invoked when the mouse button has been moved on a component (with no buttons no down).

Specified by:
mouseMoved sample code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent) definition code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent) in interface MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener
Parameters:
e - the MouseEvent