se.liu.ida.critiquer.gui
Class AgentTransferHandler
java.lang.Object
javax.swing.TransferHandler
se.liu.ida.critiquer.gui.AgentTransferHandler
- All Implemented Interfaces:
- Serializable
public class AgentTransferHandler
- extends TransferHandler
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)