|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface which manages the target of a drag/drop operation.
A DropTargetManager
implementation provides an indication
of the type of actions supported by the drop target, based on the type
of object(s) being dropped and the keyboard/mouse button state. It then
performs the appropriate action on the source object(s) upon completion
of the drop operation.
User interface assumptions:
DropTargetManager
implementation may
register its desire to manage a drop target of a given type.
DropTargetManager
implementation
will always be able to determine what sort of emphasis
the drop target should have, independent of the UI platform.
ListManager
,
ActionsManager
Field Summary | |
static int |
ACTION_COPY
Indicates that the copy action is available during the drag operation. |
static int |
ACTION_MOVE
Indicates that the move action is available during the drag operation. |
static int |
ACTION_NONE
Indicates that no actions are available during the drag operation. |
static int |
ACTION_REFERENCE
|
static int |
ALT_MASK
Indicates that the Alt key was down during the drag operation. |
static int |
BUTTON1_MASK
Indicates that mouse button 1 (the left mouse button) was down during the drag operation. |
static int |
BUTTON2_MASK
Indicates that mouse button 2 (the middle mouse button) was down during the drag operation. |
static int |
BUTTON3_MASK
Indicates that mouse button 3 (the right mouse button) was down during the drag operation. |
static int |
CTRL_MASK
Indicates that the Ctrl key was down during the drag operation. |
static int |
SHIFT_MASK
Indicates that the Shift key was down during the drag operation. |
Method Summary | |
int |
dragEnter(ObjectName[] sourceObjects,
java.awt.Component target,
java.awt.Point location,
int modifiers,
int sourceActions)
Indicates whether a drop can be accepted, and if so, the action that will take place on the drop. |
void |
dragExit()
Called when the user ceases to drag the mouse over the UI representation of the drop target. |
int |
dragOver(java.awt.Component target,
java.awt.Point location,
int modifiers,
int sourceActions)
Called while the user continues to drag the mouse over the UI representation of the drop target. |
int |
drop(ObjectName[] sourceObjects,
java.awt.Component target,
java.awt.Point location,
int modifiers,
int sourceActions)
Called when the user "drops" the objects being dragged by releasing the mouse button. |
void |
initialize(ObjectName dropTarget,
java.awt.Frame dropFrame)
Identifies the target of the drag/drop operation. |
Field Detail |
public static final int SHIFT_MASK
public static final int CTRL_MASK
public static final int ALT_MASK
public static final int BUTTON1_MASK
public static final int BUTTON2_MASK
public static final int BUTTON3_MASK
public static final int ACTION_NONE
public static final int ACTION_COPY
public static final int ACTION_MOVE
public static final int ACTION_REFERENCE
Method Detail |
public void initialize(ObjectName dropTarget, java.awt.Frame dropFrame)
dropTarget
- the object name of the drop target.dropFrame
- the frame of the drop target.
ObjectName
,
UIServices
public int dragEnter(ObjectName[] sourceObjects, java.awt.Component target, java.awt.Point location, int modifiers, int sourceActions)
This method is called the first time the user drags the mouse over
the UI representation of the drop target. dragEnter
must determine what actions will be accepted, if any, based on
the actions supported by the drag source and the state of the
modifier keys.
sourceObjects
- an array of ObjectNames
which identify
the objects being dragged.target
- the UI component representing the drop target. (unimplemented)location
- the location of the drag cursor over the drop target. (unimplemented)modifiers
- flags indicating the keyboard/mouse state.sourceActions
- flags indicating which actions the drop source supports.ObjectName
public int dragOver(java.awt.Component target, java.awt.Point location, int modifiers, int sourceActions)
dragOver
must determine what actions will be accepted, if any, based on
the actions supported by the drag source and the state of the
modifier keys.target
- the UI component representing the drop target. (unimplemented)location
- the location of the drag cursor over the drop target. (unimplemented)modifiers
- flags indicating the keyboard/mouse state.sourceActions
- flags indicating which actions the drop source supports.ObjectName
,
dragEnter(com.ibm.as400.opnav.ObjectName[], java.awt.Component, java.awt.Point, int, int)
public void dragExit()
dragEnter(com.ibm.as400.opnav.ObjectName[], java.awt.Component, java.awt.Point, int, int)
public int drop(ObjectName[] sourceObjects, java.awt.Component target, java.awt.Point location, int modifiers, int sourceActions)
drop
may either reject
the drop operation or perform the appropriate action(s) on the drop target,
based on the state of the modifier keys.sourceObjects
- an array of ObjectNames
which identify
the objects being dropped.target
- the UI component representing the drop target. (unimplemented)location
- the location of the drag cursor over the drop target. (unimplemented)modifiers
- flags indicating the keyboard/mouse state.sourceActions
- flags indicating which actions the drop source supports.ObjectName
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |