se.liu.ida.critiquer.gui
Class AgentTransferHandler

java.lang.Object
  extended by javax.swing.TransferHandler
      extended by se.liu.ida.critiquer.gui.AgentTransferHandler
All Implemented Interfaces:
Serializable

public class AgentTransferHandler
extends TransferHandler

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.TransferHandler
COPY, COPY_OR_MOVE, MOVE, NONE
 
Method Summary
 void addTransferListener(TransferListener l)
           
 boolean canImport(JComponent comp, DataFlavor[] transferFlavors)
           
protected  Transferable createTransferable(JComponent c)
          This is to be used when an agent is dragged from an agent label
static AgentTransferHandler getAgentTransferHandler()
           
 int getSourceActions(JComponent c)
           
 Icon getVisualRepresentation(Transferable t)
          Show the agent image if dragging an agent
 boolean importData(JComponent comp, Transferable t)
           Select which agents are available for a commander when a drop is performed in the graph of the resource view.
 
Methods inherited from class javax.swing.TransferHandler
exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAgentTransferHandler

public static AgentTransferHandler getAgentTransferHandler()

addTransferListener

public void addTransferListener(TransferListener l)

getVisualRepresentation

public Icon getVisualRepresentation(Transferable t)
Show the agent image if dragging an agent

Overrides:
getVisualRepresentation in class TransferHandler
See Also:
TransferHandler.getVisualRepresentation(java.awt.datatransfer.Transferable)

canImport

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

getSourceActions

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

createTransferable

protected Transferable createTransferable(JComponent c)
This is to be used when an agent is dragged from an agent label

Overrides:
createTransferable in class TransferHandler
See Also:
TransferHandler.createTransferable(javax.swing.JComponent)

importData

public boolean importData(JComponent comp,
                          Transferable t)

Select which agents are available for a commander when a drop is performed in the graph of the resource view. Actually we have activities in the graph view, but we can only select activities that have an assigned commander and all activities with the same commander are selected if one is, so as to highlight which activities are affected

Overrides:
importData in class TransferHandler
See Also:
TransferHandler.importData(javax.swing.JComponent, java.awt.datatransfer.Transferable)