API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing. TransferHandler View Source
Author(s)
Timothy Prinzing
Shannon Hickey
Since
1.4
Version
1.47 06/06/06
Serial
Hierarchy
 Object
      TransferHandler
Implements
 Serializable
Subclasses
Description
@SuppressWarnings (value="serial")
public class TransferHandler
  This class is used to handle the transfer of a Transferable to and from Swing components.
See also:   
Constructors
protected TransferHandler ()
Convenience constructor for subclasses.
public TransferHandler (String property)
  Constructs a transfer handler that can transfer a Java Bean property from one component to another via the clipboard or a drag and drop operation.
Methods
Hide/Show inherited methods
public boolean canImport (JComponent comp, DataFlavor transferFlavors)
  Indicates whether a component will accept an import of the given set of data flavors prior to actually attempting to import it.
public boolean canImport (TransferSupport support)
  This method is called repeatedly during a drag and drop operation to allow the developer to configure properties of, and to return the acceptability of transfers; with a return value of true indicating that the transfer represented by the given TransferSupport (which contains all of the details of the transfer) is acceptable at the current time, and a value of false rejecting the transfer.
protected Transferable createTransferable (JComponent c)
  Creates a Transferable to use as the source for a data transfer.
public void exportAsDrag (JComponent comp, InputEvent e, int action)
  Causes the Swing drag support to be initiated.
protected void exportDone (JComponent source, Transferable data, int action)
  Invoked after data has been exported.
public void exportToClipboard (JComponent comp, Clipboard clip, int action) throws IllegalStateException
  Causes a transfer from the given component to the given clipboard.
publicstatic Action getCopyAction ()
  Returns an Action that performs copy operations to the clipboard.
publicstatic Action getCutAction ()
  Returns an Action that performs cut operations to the clipboard.
publicstatic Action getPasteAction ()
  Returns an Action that performs paste operations from the clipboard.
public int getSourceActions (JComponent c)
  Returns the type of transfer actions supported by the source; any bitwise-OR combination of COPY, MOVE and LINK.
public Icon getVisualRepresentation (Transferable t)
  Returns an object that establishes the look of a transfer.
public boolean importData (JComponent comp, Transferable t)
  Causes a transfer to a component from a clipboard or a DND drop operation.
public boolean importData (TransferSupport support)
  Causes a transfer to occur from a clipboard or a drag and drop operation.
Fields
Hide/Show inherited fields
publicfinalstatic int COPY = "1"
  An int representing a "copy" transfer action.
publicfinalstatic int COPY_OR_MOVE = "3"
An int representing a source action capability of either "copy" or "move".
pack-privatefinalstatic Action copyAction
pack-privatefinalstatic Action cutAction
publicfinalstatic int LINK = "1073741824"
  An int representing a "link" transfer action.
publicfinalstatic int MOVE = "2"
  An int representing a "move" transfer action.
publicfinalstatic int NONE = "0"
An int representing no transfer action.
pack-privatefinalstatic Action pasteAction
Nested Classes
  TransferHandler.HasGetTransferHandler
An interface to tag things with a getTransferHandler method.
  TransferHandler.DropLocation
Represents a location where dropped data should be inserted.
  TransferHandler.TransferSupport
This class encapsulates all relevant details of a clipboard or drag and drop transfer, and also allows for customizing aspects of the drag and drop experience.
  TransferHandler.PropertyTransferable
  TransferHandler.SwingDropTarget
This is the default drop target for drag and drop operations if one isn't provided by the developer.
  TransferHandler.TransferAction
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar