net.sf.freecol.client.gui.panel
Class BuildQueuePanel.BuildQueueTransferHandler

java.lang.Object
  extended by javax.swing.TransferHandler
      extended by net.sf.freecol.client.gui.panel.BuildQueuePanel.BuildQueueTransferHandler
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
BuildQueuePanel

public class BuildQueuePanel.BuildQueueTransferHandler
extends javax.swing.TransferHandler

This class implements a transfer handler able to transfer BuildQueueItems between the build queue list, the unit list and the building list.

See Also:
Serialized Form

Nested Class Summary
 class BuildQueuePanel.BuildQueueTransferHandler.BuildQueueTransferable
          This class implements the Transferable interface.
 
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
BuildQueuePanel.BuildQueueTransferHandler()
           
 
Method Summary
 boolean canImport(javax.swing.JComponent comp, java.awt.datatransfer.DataFlavor[] flavors)
          Returns true if the component can import this data flavor.
 int getSourceActions(javax.swing.JComponent comp)
          Returns the possible source actions of the component.
 boolean importData(javax.swing.JComponent comp, java.awt.datatransfer.Transferable data)
          Imports a build queue into the build queue list, the building list or the unit list, if possible.
 
Methods inherited from class javax.swing.TransferHandler
canImport, exportAsDrag, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation, importData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildQueuePanel.BuildQueueTransferHandler

public BuildQueuePanel.BuildQueueTransferHandler()
Method Detail

importData

public boolean importData(javax.swing.JComponent comp,
                          java.awt.datatransfer.Transferable data)
Imports a build queue into the build queue list, the building list or the unit list, if possible.

Overrides:
importData in class javax.swing.TransferHandler
Parameters:
comp - The list which imports data.
data - The build queue to import.
Returns:
Whether the import was successful.

canImport

public boolean canImport(javax.swing.JComponent comp,
                         java.awt.datatransfer.DataFlavor[] flavors)
Returns true if the component can import this data flavor.

Overrides:
canImport in class javax.swing.TransferHandler
Parameters:
comp - The component to import data.
flavors - An array of data flavors.

getSourceActions

public int getSourceActions(javax.swing.JComponent comp)
Returns the possible source actions of the component.

Overrides:
getSourceActions in class javax.swing.TransferHandler
Parameters:
comp - The source component.
Returns:
The possible source actions of the component.