javax.swing.plaf.basic
Class BasicFileChooserUI.FileTransferHandler
java.lang.Object
javax.swing.TransferHandler
javax.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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicFileChooserUI.FileTransferHandler
BasicFileChooserUI.FileTransferHandler()
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 TransferHandler
s
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