java.awt.dnd
Class DragSourceDragEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.dnd.DragSourceEvent
              |
              +--java.awt.dnd.DragSourceDragEvent
All Implemented Interfaces:
Serializable

public class DragSourceDragEvent
extends DragSourceEvent

Safe:

See Also:
Serialized Form

Field Summary
private  int dropAction
          The user drop action.
private  int gestureModifiers
          The state of the input device modifiers associated with the user gesture.
(package private) static int JDK_1_3_MODIFIERS
           
private static long serialVersionUID
           
private  int targetActions
          The target drop action.
 
Fields inherited from class java.awt.dnd.DragSourceEvent
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DragSourceDragEvent(DragSourceContext dsc, int dropAction, int actions, int modifiers)
          Suppressed: Constructs a DragSourceDragEvent.
DragSourceDragEvent(DragSourceContext dsc, int dropAction, int actions, int modifiers, int x, int y)
          Suppressed: Constructs a DragSourceDragEvent given the specified DragSourceContext, user drop action, target drop action, modifiers and coordinates.
 
Method Summary
 int getDropAction()
          Enabled: This method returns the logical intersection of the user drop action, the target drop action and the set of drop actions supported by the drag source.
 int getGestureModifiers()
          Enabled: This method returns an int representing the current state of the input device modifiers associated with the user's gesture.
 int getGestureModifiersEx()
          Suppressed: This method returns an int representing the current state of the input device extended modifiers associated with the user's gesture.
 int getTargetActions()
          Enabled: This method returns the target drop action.
 int getUserAction()
          Enabled: This method returns the user drop action.
private  void setNewModifiers()
          Sets new modifiers by the old ones.
private  void setOldModifiers()
          Sets old modifiers by the new ones.
 
Methods inherited from class java.awt.dnd.DragSourceEvent
getDragSourceContext, getLocation, getX, getY
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID

JDK_1_3_MODIFIERS

static final int JDK_1_3_MODIFIERS

targetActions

private int targetActions
The target drop action.


dropAction

private int dropAction
The user drop action.


gestureModifiers

private int gestureModifiers
The state of the input device modifiers associated with the user gesture.

Constructor Detail

DragSourceDragEvent

public DragSourceDragEvent(DragSourceContext dsc,
                           int dropAction,
                           int actions,
                           int modifiers)
Suppressed: Constructs a DragSourceDragEvent. This class is typically instantiated by the DragSourceContextPeer rather than directly by client code. The coordinates for this DragSourceDragEvent are not specified, so getLocation will return null for this event.

Parameters:
dsc - the DragSourceContext that is to manage notifications for this event.
dropAction - the user drop action.
actions - the target drop action.
modifiers - the modifier keys down during event (shift, ctrl, alt, meta) Either extended _DOWN_MASK or old _MASK modifiers should be used, but both models should not be mixed in one event. Use of the extended modifiers is preferred.
See Also:
java.awt.event.InputEvent, DragSourceEvent.getLocation()

DragSourceDragEvent

public DragSourceDragEvent(DragSourceContext dsc,
                           int dropAction,
                           int actions,
                           int modifiers,
                           int x,
                           int y)
Suppressed: Constructs a DragSourceDragEvent given the specified DragSourceContext, user drop action, target drop action, modifiers and coordinates.

Parameters:
dsc - the DragSourceContext associated with this event.
dropAction - the user drop action.
actions - the target drop action.
modifiers - the modifier keys down during event (shift, ctrl, alt, meta) Either extended _DOWN_MASK or old _MASK modifiers should be used, but both models should not be mixed in one event. Use of the extended modifiers is preferred.
x - the horizontal coordinate for the cursor location
y - the vertical coordinate for the cursor location
Since:
1.4
See Also:
java.awt.event.InputEvent
Method Detail

getTargetActions

public int getTargetActions()
Enabled: This method returns the target drop action.

Returns:
the target drop action.

getGestureModifiers

public int getGestureModifiers()
Enabled: This method returns an int representing the current state of the input device modifiers associated with the user's gesture. Typically these would be mouse buttons or keyboard modifiers.

Returns:
the current state of the input device modifiers

getGestureModifiersEx

public int getGestureModifiersEx()
Suppressed: This method returns an int representing the current state of the input device extended modifiers associated with the user's gesture. See InputEvent.getModifiersEx()

Returns:
the current state of the input device extended modifiers
Since:
1.4

getUserAction

public int getUserAction()
Enabled: This method returns the user drop action.

Returns:
the user drop action.

getDropAction

public int getDropAction()
Enabled: This method returns the logical intersection of the user drop action, the target drop action and the set of drop actions supported by the drag source.

Returns:
the logical intersection of the user drop action, the target drop action and the set of drop actions supported by the drag source.

setNewModifiers

private void setNewModifiers()
Sets new modifiers by the old ones. The mouse modifiers have higher priority than overlaying key modifiers.


setOldModifiers

private void setOldModifiers()
Sets old modifiers by the new ones.



comments?