|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.loaders.LoaderTransfer
Class that contains specific datatransfer flavors and methods to work with transfered DataObjects. There are flavors to allow a DataObject to be copied or cut into clipboard, and to retrieve them from clipboard when implementing paste operation.
This is a dummy utility class--no instances are possible.
Field Summary | |
static int |
CLIPBOARD_COPY
Constant indicating copying to the clipboard. |
static int |
CLIPBOARD_CUT
Constant indicating cutting to the clipboard. |
static int |
COPY
Generic mask for copying DataObjects (do not destroy the original). |
static int |
DND_COPY
|
static int |
DND_COPY_OR_MOVE
|
static int |
DND_LINK
|
static int |
DND_MOVE
|
static int |
DND_NONE
Constants for drag-n-drop operations. |
static int |
DND_REFERENCE
|
static int |
MOVE
Generic mask for moving DataObjects (destroy the original). |
Method Summary | |
static DataObject |
getDataObject(Transferable t,
int action)
Obtain a DataObject from a transferable. |
static DataObject[] |
getDataObjects(Transferable t,
int action)
Obtain a list of DataObjects from a transferable. |
static ExTransferable.Single |
transferable(DataObject d,
int actions)
Creates transferable that represents an operation, such as cut-to-clipboard. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DND_NONE
DnDConstants
.
public static final int DND_COPY
public static final int DND_MOVE
public static final int DND_COPY_OR_MOVE
public static final int DND_LINK
public static final int DND_REFERENCE
public static final int CLIPBOARD_COPY
DND_COPY
, because
copy to clipboard and d'n'd copy should be the same.
public static final int CLIPBOARD_CUT
public static final int COPY
CLIPBOARD_COPY
or DND_COPY
.
public static final int MOVE
CLIPBOARD_CUT
or DND_MOVE
.
Method Detail |
public static ExTransferable.Single transferable(DataObject d, int actions)
getDataObject(java.awt.datatransfer.Transferable, int)
and getDataObjects(java.awt.datatransfer.Transferable, int)
.
d
- the DataObject to create a transferable foractions
- the action performed on the DataObject's node
public static DataObject getDataObject(Transferable t, int action)
t
- transferableaction
- one of the DND_*
or CLIPBOARD_*
constants
null
public static DataObject[] getDataObjects(Transferable t, int action)
getDataObject(java.awt.datatransfer.Transferable, int)
.
If there is a multiple transfer
(of at least one element),
each element of which
contains a DataObject, then an array of these will be returned.
If neither of these things is true, null
will be returned.
This is a convenience method intended for those who wish to specially support pastes of multiple DataObjects at once.
t
- the transferable to probeaction
- a DnD or clipboard constant
null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |