public abstract class LoaderTransfer extends Object
This is a dummy utility class--no instances are possible.
Modifier and Type | Field | Description |
---|---|---|
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).
|
Modifier and Type | Method | Description |
---|---|---|
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 org.openide.util.datatransfer.ExTransferable.Single |
transferable(DataObject d,
int actions) |
Creates transferable that represents an operation, such as cut-to-clipboard.
|
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
.public static org.openide.util.datatransfer.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 nodepublic static DataObject getDataObject(Transferable t, int action)
t
- transferableaction
- one of the DND_*
or CLIPBOARD_*
constantsnull
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 constantnull
Built on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.