org.embl.ebi.escience.scuflworkers.workflow
Class WorkflowEditProcessorAction

java.lang.Object
  extended by org.embl.ebi.escience.scuflworkers.workflow.WorkflowEditProcessorAction
All Implemented Interfaces:
ProcessorActionSPI

public class WorkflowEditProcessorAction
extends java.lang.Object
implements ProcessorActionSPI


Constructor Summary
WorkflowEditProcessorAction()
           
 
Method Summary
 boolean canHandle(Processor processor)
          Can this action handle the specified processor? Return true if this action is applicable.
 java.lang.String getDescription()
          Return a short description of the action to be used as the text in a context menu
 javax.swing.ImageIcon getIcon()
          Return an Icon to represent this action, return null if you want to use the default icon (boring)
 java.awt.event.ActionListener getListener(Processor processor)
          Return an ActionListener to be attached to whatever component is being generated.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowEditProcessorAction

public WorkflowEditProcessorAction()
Method Detail

getListener

public java.awt.event.ActionListener getListener(Processor processor)
Description copied from interface: ProcessorActionSPI
Return an ActionListener to be attached to whatever component is being generated. In the case of a context menu this will be a JMenuItem but it's best not to assume anything, it could be any kind of component. This method is passed the Processor object concerned, remember that the SPI mechanism creates a single instance of each implementing class so you should be careful about keeping state in the implementation (by 'be careful' I really mean 'don't').

Specified by:
getListener in interface ProcessorActionSPI

canHandle

public boolean canHandle(Processor processor)
Description copied from interface: ProcessorActionSPI
Can this action handle the specified processor? Return true if this action is applicable.

Specified by:
canHandle in interface ProcessorActionSPI

getDescription

public java.lang.String getDescription()
Description copied from interface: ProcessorActionSPI
Return a short description of the action to be used as the text in a context menu

Specified by:
getDescription in interface ProcessorActionSPI

getIcon

public javax.swing.ImageIcon getIcon()
Description copied from interface: ProcessorActionSPI
Return an Icon to represent this action, return null if you want to use the default icon (boring)

Specified by:
getIcon in interface ProcessorActionSPI