Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JavaTM 2 Platform Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

The `DragSourceDragEvent` is delivered from the `DragSourceContextPeer`, via the `DragSourceContext`, to the currently registered `DragSourceListener`. It contains state regarding the current state of the operation to enable the operations initiator to provide the end user with the appropriate drag over feedback.

Since:
  1.2
See Also:
  Serialized Form

Fields inherited from class java.util.EventObject
`source`

Constructor Summary
`DragSourceDragEvent(DragSourceContext dsc, int dropAction, int actions, int modifiers)` Constructs a `DragSourceDragEvent`.

Method Summary
`int` | `getDropAction()` This method returns an `int` representing the effective drop action which is the intersection of the user's selected action, and the source and target actions.
`int` | `getGestureModifiers()` This method returns an `int` representing the current state of the input device modifiers associated with the user's gesture.
`int` | `getTargetActions()` This method returns the logical intersection of the current target, source, and user actions.
`int` | `getUserAction()` This method returns an `int` representing the user's currently selected drop action.

Methods inherited from class java.awt.dnd.DragSourceEvent
`getDragSourceContext`

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`

Constructor Detail

### DragSourceDragEvent

    public DragSourceDragEvent(DragSourceContext dsc,
                               int dropAction,
                               int actions,
                               int modifiers)

  Constructs a `DragSourceDragEvent`. This class is typically instantiated by the `DragSourceContextPeer` rather than directly by client code.

  Parameters:
    `dsc` - the `DragSourceContext` that is to manage notifications for this event.
    `dropAction` - the value of one of the static fields from `DNDConstants` indicating the type of user drop action this event represents.
    `actions` - the value of one of the static fields from `DNDConstants` indicating the type of target drop action supported by and returned from the current drop target.
    `modifiers` - specifies the state of the input device modifiers associated with the user gesture.

Method Detail

### getTargetActions

    public int getTargetActions()

  This method returns the logical intersection of the current target, source, and user actions.

  Returns:
    the logical intersection of the current target, source and user actions

### getGestureModifiers

    public int getGestureModifiers()

  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

### getUserAction

    public int getUserAction()

  This method returns an `int` representing the user's currently selected drop action.

  Returns:
    the user's currently selected drop action

### getDropAction

    public int getDropAction()

  This method returns an `int` representing the effective drop action which is the intersection of the user's selected action, and the source and target actions.

  Returns:
    the effective drop action which is the intersection of the user's selected action, and the source and target actions.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JavaTM 2 Platform Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.