Drag_n_Drop
Class FSTree.FSTransfer

java.lang.Object
  extended by javax.swing.TransferHandler
      extended by Drag_n_Drop.FSTree.FSTransfer
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
FSTree

public class FSTree.FSTransfer
extends javax.swing.TransferHandler

Inner class, handle the drag-and-drop action. Create instance of Send to start sending data to the target node.

See Also:
Send, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.TransferHandler
javax.swing.TransferHandler.DropLocation, javax.swing.TransferHandler.TransferSupport
 
Field Summary
 
Fields inherited from class javax.swing.TransferHandler
COPY, COPY_OR_MOVE, LINK, MOVE, NONE
 
Constructor Summary
FSTree.FSTransfer()
           
 
Method Summary
 boolean canImport(javax.swing.JComponent comp, java.awt.datatransfer.DataFlavor[] transferFlavors)
          Override method, allow transfer
 boolean importData(javax.swing.JComponent comp, java.awt.datatransfer.Transferable t)
          Import data, override method
 
Methods inherited from class javax.swing.TransferHandler
canImport, createTransferable, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getSourceActions, getVisualRepresentation, importData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSTree.FSTransfer

public FSTree.FSTransfer()
Method Detail

importData

public boolean importData(javax.swing.JComponent comp,
                          java.awt.datatransfer.Transferable t)
Import data, override method

Overrides:
importData in class javax.swing.TransferHandler
Parameters:
comp - component that receives the importing data, provided to enable sharing of TransferHandlers
t - the data to import
Returns:
true if the data can be trasfered, false if exceptions happen

canImport

public boolean canImport(javax.swing.JComponent comp,
                         java.awt.datatransfer.DataFlavor[] transferFlavors)
Override method, allow transfer

Overrides:
canImport in class javax.swing.TransferHandler
Parameters:
comp - component that receives the importing data, provided to enable sharing of TransferHandlers
transferFlavors - the data format available
Returns:
true if the data can be transferred