net.sourceforge.bee
Class StringTransferHandler

java.lang.Object
  extended by javax.swing.TransferHandler
      extended by net.sourceforge.bee.StringTransferHandler
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TabDelimitedTransferHandler

public abstract class StringTransferHandler
extends TransferHandler

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.TransferHandler
COPY, COPY_OR_MOVE, MOVE, NONE
 
Constructor Summary
StringTransferHandler()
           
 
Method Summary
 boolean canImport(JComponent comp, DataFlavor[] flavors)
           
protected abstract  void cleanup(JComponent comp, boolean remove)
           
protected  Transferable createTransferable(JComponent comp)
           
protected  void exportDone(JComponent comp, Transferable data, int action)
           
protected abstract  String exportString(JComponent comp)
           
 int getSourceActions(JComponent comp)
           
 boolean importData(JComponent comp, Transferable trans)
           
protected abstract  void importString(JComponent comp, String str)
           
 
Methods inherited from class javax.swing.TransferHandler
exportAsDrag, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringTransferHandler

public StringTransferHandler()
Method Detail

exportString

protected abstract String exportString(JComponent comp)

importString

protected abstract void importString(JComponent comp,
                                     String str)

cleanup

protected abstract void cleanup(JComponent comp,
                                boolean remove)

createTransferable

protected Transferable createTransferable(JComponent comp)
Overrides:
createTransferable in class TransferHandler

getSourceActions

public int getSourceActions(JComponent comp)
Overrides:
getSourceActions in class TransferHandler

importData

public boolean importData(JComponent comp,
                          Transferable trans)
Overrides:
importData in class TransferHandler

exportDone

protected void exportDone(JComponent comp,
                          Transferable data,
                          int action)
Overrides:
exportDone in class TransferHandler

canImport

public boolean canImport(JComponent comp,
                         DataFlavor[] flavors)
Overrides:
canImport in class TransferHandler