csheets.ui.sheet
Class CellTransferable
java.lang.Object
csheets.ui.sheet.CellTransferable
- All Implemented Interfaces:
- ClipboardOwner, Transferable
public class CellTransferable
- extends Object
- implements Transferable, ClipboardOwner
A transferable for transferring a range of cells. Cells are transferred
either as objects locally within the Java VM, or exported as strings.
- Author:
- Einar Pehrson
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCAL_CELL_FLAVOR
public static final DataFlavor LOCAL_CELL_FLAVOR
- The data flavor for local transfer of cells
SERIAL_CELL_FLAVOR
public static final DataFlavor SERIAL_CELL_FLAVOR
- The data flavor for serialized transfer of cells
CellTransferable
public CellTransferable(Cell[][] cells)
- Creates a new cell transferable.
- Parameters:
cells - the cells to transfer
getTransferData
public Object getTransferData(DataFlavor flavor)
throws UnsupportedFlavorException
- Specified by:
getTransferData in interface Transferable
- Throws:
UnsupportedFlavorException
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
- Specified by:
getTransferDataFlavors in interface Transferable
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor flavor)
- Specified by:
isDataFlavorSupported in interface Transferable
lostOwnership
public void lostOwnership(Clipboard clipboard,
Transferable contents)
- Specified by:
lostOwnership in interface ClipboardOwner