Package uk.ac.starlink.table.gui
Class TableLoadTransferHandler
java.lang.Object
javax.swing.TransferHandler
uk.ac.starlink.table.gui.TableLoadTransferHandler
- All Implemented Interfaces:
Serializable
TransferHandler which will load a table if it is dragged onto its
owner component.
Concrete implementations of this abstract class must implement the
getLoadClient() method to determine how loaded tables will be
consumed.
- Since:
- 16 Sep 2010
- Author:
- Mark Taylor
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.TransferHandler
TransferHandler.DropLocation, TransferHandler.TransferSupport -
Field Summary
Fields inherited from class javax.swing.TransferHandler
COPY, COPY_OR_MOVE, LINK, MOVE, NONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanImport(JComponent comp, DataFlavor[] flavors) protected abstract TableLoadClientReturns a GUI consumer for any tables loaded by this panel.intgetSourceActions(JComponent comp) booleanimportData(JComponent comp, Transferable trans) Methods inherited from class javax.swing.TransferHandler
canImport, createTransferable, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getDragImage, getDragImageOffset, getPasteAction, getVisualRepresentation, importData, setDragImage, setDragImageOffset
-
Constructor Details
-
TableLoadTransferHandler
Constructor.- Parameters:
tfact- factory to handle transferred-in tables
-
-
Method Details
-
getLoadClient
Returns a GUI consumer for any tables loaded by this panel. It will be called once for each load sequence; the returned object may or may not be the same one each time.- Returns:
- load client ready to accept tables
-
canImport
- Overrides:
canImportin classTransferHandler
-
importData
- Overrides:
importDatain classTransferHandler
-
getSourceActions
- Overrides:
getSourceActionsin classTransferHandler
-