org.tentackle.plaf
Class TTableTransferHandler

java.lang.Object
  extended by javax.swing.TransferHandler
      extended by org.tentackle.plaf.TTableTransferHandler
All Implemented Interfaces:
Serializable, UIResource

public class TTableTransferHandler
extends TransferHandler
implements UIResource

Transfer handler for FormTables.

Differs from original transferhandler in that drag can be enabled to drag cells instead of rows. To enable this feature, the FormTable must setCellDragEnabled(true), which is true by default as this is 99%-case.

Author:
harald
See Also:
Serialized Form

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
TTableTransferHandler()
           
 
Method Summary
protected  Transferable createTransferable(JComponent c)
          Creates 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; any bitwise-OR combination of COPY, MOVE and LINK.
 
Methods inherited from class javax.swing.TransferHandler
canImport, canImport, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation, importData, importData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TTableTransferHandler

public TTableTransferHandler()
Method Detail

createTransferable

protected Transferable createTransferable(JComponent c)
Description copied from class: javax.swing.TransferHandler
Creates a Transferable to use as the source for a data transfer. Returns the representation of the data to be transferred, or null if the component's property is null

Overrides:
createTransferable in class TransferHandler
Parameters:
c - the component holding the data to be transferred; provided to enable sharing of TransferHandlers
Returns:
the representation of the data to be transferred, or null if the property associated with c is null

getSourceActions

public int getSourceActions(JComponent c)
Description copied from class: javax.swing.TransferHandler
Returns the type of transfer actions supported by the source; any bitwise-OR combination of COPY, MOVE and LINK.

Some models are not mutable, so a transfer operation of MOVE should not be advertised in that case. Returning NONE disables transfers from the component.

Overrides:
getSourceActions in class TransferHandler
Parameters:
c - the component holding the data to be transferred; provided to enable sharing of TransferHandlers
Returns:
COPY if the transfer property can be found, otherwise returns NONE


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de