|
Préférences
Moteurs de recherche
|
|||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.5.0
java.awt.dnd
|
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
DragSourceDragEvent(DragSourceContext dsc,
int dropAction,
int action,
int modifiers)
Constructs a DragSourceDragEvent . |
|
DragSourceDragEvent(DragSourceContext dsc,
int dropAction,
int action,
int modifiers,
int x,
int y)
Constructs a DragSourceDragEvent given the specified
DragSourceContext , user drop action, target drop action,
modifiers and coordinates. |
Method Summary | |
---|---|
int |
getDropAction()
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()
This method returns an int representing
the current state of the input device modifiers
associated with the user's gesture. |
int |
getGestureModifiersEx()
This method returns an int representing
the current state of the input device extended modifiers
associated with the user's gesture. |
int |
getTargetActions()
This method returns the target drop action. |
int |
getUserAction()
This method returns the user drop action. |
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 |
Constructor Detail |
---|
public DragSourceDragEvent(DragSourceContext dsc, int dropAction, int action, int modifiers)
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.
The arguments dropAction
and action
should
be one of DnDConstants
that represents a single action.
The argument modifiers
should be either a bitwise mask
of old java.awt.event.InputEvent.*_MASK
constants or a
bitwise mask of extended java.awt.event.InputEvent.*_DOWN_MASK
constants.
This constructor does not throw any exception for invalid dropAction
,
action
and modifiers
.
dsc
- the DragSourceContext
that is to manage
notifications for this event.dropAction
- the user drop action.action
- 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.
IllegalArgumentException
- if dsc
is null
.InputEvent
,
DragSourceEvent.getLocation()
public DragSourceDragEvent(DragSourceContext dsc, int dropAction, int action, int modifiers, int x, int y)
DragSourceDragEvent
given the specified
DragSourceContext
, user drop action, target drop action,
modifiers and coordinates.
The arguments dropAction
and action
should
be one of DnDConstants
that represents a single action.
The argument modifiers
should be either a bitwise mask
of old java.awt.event.InputEvent.*_MASK
constants or a
bitwise mask of extended java.awt.event.InputEvent.*_DOWN_MASK
constants.
This constructor does not throw any exception for invalid dropAction
,
action
and modifiers
.
dsc
- the DragSourceContext
associated with this
event.dropAction
- the user drop action.action
- 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 locationy
- the vertical coordinate for the cursor location
IllegalArgumentException
- if dsc
is null
.InputEvent
Method Detail |
---|
public int getTargetActions()
public int getGestureModifiers()
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.
If the modifiers
passed to the constructor
are invalid, this method returns them unchanged.
public int getGestureModifiersEx()
int
representing
the current state of the input device extended modifiers
associated with the user's gesture.
See InputEvent.getModifiersEx()
If the modifiers
passed to the constructor
are invalid, this method returns them unchanged.
public int getUserAction()
public int getDropAction()