Class UIDragDrop
public abstract class UIDragDrop
{
// Methods
public static void beginDrag(TransferSession session);
public static void beginDrag(MetaObject data, int available);
public static void beginDrag(MetaObject data, int available, int preferred);
public static void beginDrag(DragSource source, MetaObject data,
int available);
public static void beginDrag(DragSource source, MetaObject data,
int available, int preferred);
public static void beginDrag(DragSource source, TransferSession session);
}
This class implements the beginDrag drag-and-drop API for AFC objects. It is similar to the AWT-based implementation in the WDragSession class. The dragdrop APIs work for both AWT and Microsoft AFC, but are implemented slightly different. For a small comparative example of drag-and-drop functionality implemented using both AWT and AFC, see the WDragSession overview.
Use the beginDrag methods to start a drag-and-drop operation. All beginDrag methods act on two parameters, a DragSource object and a TransferSession. Several of the beginDrag methods accept various TransferSession parameters to simplify drag session creation.
Object
|
+--UIDragDrop
public static void beginDrag(TransferSession session);
Starts a drag session by obtaining a TransferSession object and acting on it. The drag session has an undefined DragSource object. Drag-and-drop TransferSession implementations must support Transfer.MOVE.
Return Value:
No return value.
Parameter | Description |
session
| The TransferSession object that is used during the current drag operation.
|
public static void beginDrag(MetaObject data, int available);
Starts a drag session by obtaining a TransferSession object and acting on it. The drag session has an undefined DragSource object. Drag-and-drop TransferSession implementations must support Transfer.MOVE.
Return Value:
No return value.
Parameter | Description |
data
| A MetaObject used to create a TransferSession object. It is used in the current drag session.
|
available
| The transfer effects that are available for the created TransferSession. These include NONE, COPY, MOVE, and LINK.
|
public static void beginDrag(MetaObject data, int available, int preferred);
Starts a drag session by obtaining a TransferSession object and acting on it. The drag session has an undefined DragSource object. Drag-and-drop TransferSession implementations must support Transfer.MOVE.
Return Value:
No return value.
Parameter | Description |
data
| A MetaObject used to create a TransferSession object. It is used in the current drag session.
|
available
| The transfer effects that are available for the created TransferSession. These include NONE, COPY, MOVE, and LINK. |
preferred
| The preferred transfer effects for the current TransferSession.
|
public static void beginDrag(DragSource source, MetaObject data,
int available);
Starts a drag session by obtaining a TransferSession object and acting on it. Drag-and-drop TransferSession implementations must support Transfer.MOVE.
Return Value:
No return value.
Parameter | Description |
source
| A DragSource object that provides custom cursor behavior for the drag session.
|
data
| A MetaObject used to create a TransferSession object. It is used in the current drag session.
|
available
| The transfer effects that are available for the created TransferSession. These include NONE, COPY, MOVE, and LINK. |
public static void beginDrag(DragSource source, MetaObject data,
int available, int preferred);
Starts a drag session by obtaining a TransferSession object and acting on it. Drag-and-drop TransferSession implementations must support Transfer.MOVE.
Return Value:
No return value.
Parameter | Description |
source
| A DragSource object that provides custom cursor behavior for the drag session.
|
data
| A MetaObject used to create a TransferSession object. It is used in the current drag session.
|
available
| The transfer effects that are available for the created TransferSession. These include NONE, COPY, MOVE, and LINK. |
preferred
| The preferred transfer effects for the current TransferSession.
|
public static void beginDrag(DragSource source, TransferSession session);
Starts a drag session by obtaining a TransferSession object and acting on it. Drag-and-drop TransferSession implementations must support Transfer.MOVE.
Return Value:
No return value.
Parameter | Description |
source
| A DragSource object that provides custom cursor behavior for the drag session.
|
session
| The TransferSession object that is used during the current drag operation.
|