Uses of Interface
java.awt.datatransfer.Transferable
Package
Description
Provides interfaces and classes for transferring data between and within
applications.
Drag and Drop is a direct manipulation gesture found in many Graphical User
Interface systems that provides a mechanism to transfer information between
two entities logically associated with presentation elements in the GUI.
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
-
Uses of Transferable in java.awt.datatransfer
Modifier and TypeClassDescriptionclass
ATransferable
which implements the capability required to transfer aString
.Modifier and TypeFieldDescriptionprotected Transferable
Clipboard.contents
Contents of the clipboard.Modifier and TypeMethodDescriptionClipboard.getContents
(Object requestor) Returns a transferable object representing the current contents of the clipboard.Modifier and TypeMethodDescriptionDataFlavor.getReaderForText
(Transferable transferable) Gets a Reader for a text flavor, decoded, if necessary, for the expected charset (encoding).void
ClipboardOwner.lostOwnership
(Clipboard clipboard, Transferable contents) Notifies this object that it is no longer the clipboard owner.void
StringSelection.lostOwnership
(Clipboard clipboard, Transferable contents) void
Clipboard.setContents
(Transferable contents, ClipboardOwner owner) Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents. -
Uses of Transferable in java.awt.dnd
Modifier and TypeClassDescriptionprotected class
TransferableProxy
is a helper inner class that implementsTransferable
interface and serves as a proxy for anotherTransferable
object which represents data transfer for a particular drag-n-drop operation.Modifier and TypeFieldDescriptionprotected Transferable
DropTargetContext.TransferableProxy.transferable
The encapsulatedTransferable
object.Modifier and TypeMethodDescriptionprotected Transferable
DropTargetContext.createTransferableProxy
(Transferable t, boolean local) Creates a TransferableProxy to proxy for the specified Transferable.DragSourceContext.getTransferable()
Returns theTransferable
associated with thisDragSourceContext
.protected Transferable
DropTargetContext.getTransferable()
get the Transferable (proxy) operand of this operationDropTargetDragEvent.getTransferable()
This method returns the Transferable object that represents the data associated with the current drag operation.DropTargetDropEvent.getTransferable()
This method returns theTransferable
object associated with the drop.Modifier and TypeMethodDescriptionprotected DragSourceContext
DragSource.createDragSourceContext
(DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl) Creates theDragSourceContext
to handle the current drag operation.protected Transferable
DropTargetContext.createTransferableProxy
(Transferable t, boolean local) Creates a TransferableProxy to proxy for the specified Transferable.void
DragGestureEvent.startDrag
(Cursor dragCursor, Transferable transferable) Starts the drag operation given theCursor
for this drag operation and theTransferable
representing the source data for this drag operation.void
DragGestureEvent.startDrag
(Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Starts the drag given the initialCursor
to display, theTransferable
object, and theDragSourceListener
to use.void
DragGestureEvent.startDrag
(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl) Start the drag given the initialCursor
to display, a dragImage
, the offset of theImage
, theTransferable
object, and theDragSourceListener
to use.void
DragSource.startDrag
(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Start a drag, given theDragGestureEvent
that initiated the drag, the initialCursor
to use, theTransferable
subject data of the drag, and theDragSourceListener
.void
DragSource.startDrag
(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given theDragGestureEvent
that initiated the drag, the initialCursor
to use, theTransferable
subject data of the drag, theDragSourceListener
, and theFlavorMap
.void
DragSource.startDrag
(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point dragOffset, Transferable transferable, DragSourceListener dsl) Start a drag, given theDragGestureEvent
that initiated the drag, the initialCursor
to use, theImage
to drag, the offset of theImage
origin from the hotspot of theCursor
at the instant of the trigger, the subject data of the drag, and theDragSourceListener
.void
DragSource.startDrag
(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given theDragGestureEvent
that initiated the drag, the initialCursor
to use, theImage
to drag, the offset of theImage
origin from the hotspot of theCursor
at the instant of the trigger, theTransferable
subject data of the drag, theDragSourceListener
, and theFlavorMap
.ModifierConstructorDescriptionDragSourceContext
(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point offset, Transferable t, DragSourceListener dsl) Called fromDragSource
, this constructor creates a newDragSourceContext
given theDragSourceContextPeer
for this Drag, theDragGestureEvent
that triggered the Drag, the initialCursor
to use for the Drag, an (optional)Image
to display while the Drag is taking place, the offset of theImage
origin from the hotspot at the instant of the triggering event, theTransferable
subject data, and theDragSourceListener
to use during the Drag and Drop operation. -
Uses of Transferable in javax.swing
Modifier and TypeMethodDescriptionprotected Transferable
TransferHandler.createTransferable
(JComponent c) Creates aTransferable
to use as the source for a data transfer.TransferHandler.TransferSupport.getTransferable()
Returns theTransferable
associated with this transfer.Modifier and TypeMethodDescriptionprotected void
TransferHandler.exportDone
(JComponent source, Transferable data, int action) Invoked after data has been exported.TransferHandler.getVisualRepresentation
(Transferable t) Returns an object that establishes the look of a transfer.boolean
TransferHandler.importData
(JComponent comp, Transferable t) Causes a transfer to a component from a clipboard or a DND drop operation.ModifierConstructorDescriptionTransferSupport
(Component component, Transferable transferable) Create aTransferSupport
withisDrop()
false
for the given component andTransferable
.