org.jivesoftware.spark.ui
Class StringTransferHandler

java.lang.Object
  extended by javax.swing.TransferHandler
      extended by org.jivesoftware.spark.ui.StringTransferHandler
All Implemented Interfaces:
java.io.Serializable

public abstract class StringTransferHandler
extends javax.swing.TransferHandler

Used for String Drag and Drop functionality.

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(javax.swing.JComponent c, java.awt.datatransfer.DataFlavor[] flavors)
           
protected abstract  void cleanup(javax.swing.JComponent c, boolean remove)
           
protected  java.awt.datatransfer.Transferable createTransferable(javax.swing.JComponent c)
           
protected  void exportDone(javax.swing.JComponent c, java.awt.datatransfer.Transferable data, int action)
           
protected abstract  java.lang.String exportString(javax.swing.JComponent c)
           
 int getSourceActions(javax.swing.JComponent c)
           
 boolean importData(javax.swing.JComponent c, java.awt.datatransfer.Transferable t)
           
protected abstract  void importString(javax.swing.JComponent c, java.lang.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 java.lang.String exportString(javax.swing.JComponent c)

importString

protected abstract void importString(javax.swing.JComponent c,
                                     java.lang.String str)

cleanup

protected abstract void cleanup(javax.swing.JComponent c,
                                boolean remove)

createTransferable

protected java.awt.datatransfer.Transferable createTransferable(javax.swing.JComponent c)
Overrides:
createTransferable in class javax.swing.TransferHandler

getSourceActions

public int getSourceActions(javax.swing.JComponent c)
Overrides:
getSourceActions in class javax.swing.TransferHandler

importData

public boolean importData(javax.swing.JComponent c,
                          java.awt.datatransfer.Transferable t)
Overrides:
importData in class javax.swing.TransferHandler

exportDone

protected void exportDone(javax.swing.JComponent c,
                          java.awt.datatransfer.Transferable data,
                          int action)
Overrides:
exportDone in class javax.swing.TransferHandler

canImport

public boolean canImport(javax.swing.JComponent c,
                         java.awt.datatransfer.DataFlavor[] flavors)
Overrides:
canImport in class javax.swing.TransferHandler