javax.swing.plaf.basic
Class BasicFileChooserUI.FileTransferHandler

java.lang.Object
  extended byjavax.swing.TransferHandler
      extended byjavax.swing.plaf.basic.BasicFileChooserUI.FileTransferHandler
All Implemented Interfaces:
Serializable, UIResource
Enclosing class:
BasicFileChooserUI

static class BasicFileChooserUI.FileTransferHandler
extends TransferHandler
implements UIResource

Data transfer support for the file chooser. Since files are currently presented as a list, the list support is reused with the added flavor of DataFlavor.javaFileListFlavor


Nested Class Summary
(package private) static class BasicFileChooserUI.FileTransferHandler.FileTransferable
           
 
Nested classes inherited from class javax.swing.TransferHandler
 
Field Summary
 
Fields inherited from class javax.swing.TransferHandler
COPY, COPY_OR_MOVE, MOVE, NONE
 
Constructor Summary
(package private) BasicFileChooserUI.FileTransferHandler()
           
 
Method Summary
protected  Transferable createTransferable(JComponent c)
          Create a Transferable to use as the source for a data transfer.
 int getSourceActions(JComponent c)
          Returns the type of transfer actions supported by the source.
 
Methods inherited from class javax.swing.TransferHandler
canImport, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation, importData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicFileChooserUI.FileTransferHandler

BasicFileChooserUI.FileTransferHandler()
Method Detail

createTransferable

protected Transferable createTransferable(JComponent c)
Create a Transferable to use as the source for a data transfer.

Overrides:
createTransferable in class TransferHandler
Parameters:
c - The component holding the data to be transfered. This argument is provided to enable sharing of TransferHandlers by multiple components.
Returns:
The representation of the data to be transfered.

getSourceActions

public int getSourceActions(JComponent c)
Description copied from class: TransferHandler
Returns the type of transfer actions supported by the source. Some models are not mutable, so a transfer operation of COPY only should be advertised in that case.

Overrides:
getSourceActions in class TransferHandler
Parameters:
c - the component holding the data to be transferred; this argument is provided to enable sharing of TransferHandlers by multiple components.
Returns:
COPY if the transfer property can be found, otherwise returns NONE; a return value of of NONE disables any transfers out of the component