uk.ac.starlink.table.gui
Class TableLoadTransferHandler
java.lang.Object
javax.swing.TransferHandler
uk.ac.starlink.table.gui.TableLoadTransferHandler
- All Implemented Interfaces:
- Serializable
public abstract class TableLoadTransferHandler
- extends TransferHandler
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
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TableLoadTransferHandler
public TableLoadTransferHandler(StarTableFactory tfact)
- Constructor.
- Parameters:
tfact
- factory to handle transferred-in tables
getLoadClient
protected abstract TableLoadClient 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
public boolean canImport(JComponent comp,
DataFlavor[] flavors)
- Overrides:
canImport
in class TransferHandler
importData
public boolean importData(JComponent comp,
Transferable trans)
- Overrides:
importData
in class TransferHandler
getSourceActions
public int getSourceActions(JComponent comp)
- Overrides:
getSourceActions
in class TransferHandler