org.embl.ebi.escience.scuflui.spi
Interface ProcessorActionSPI

All Known Implementing Classes:
AbstractProcessorAction, AddParserAction, BiomobyAction, BiomobyObjectAction, BiomobyWidgetAction, ConfigureMobyServiceAction, FlattenListEditAction, SetBoringAction, SliceListEditAction, SoaplabDescriberPanel, UnsetBoringAction, WorkflowEditProcessorAction

public interface ProcessorActionSPI

SPI for actions capable of operating on a Processor object in the workflow. These can then be gathered and presented in the appropriate context menus within the workbench to allow arbitrary operations such as processor configuration, metadata handling etc.

Author:
Tom Oinn

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.
 

Method Detail

getDescription

java.lang.String getDescription()
Return a short description of the action to be used as the text in a context menu


canHandle

boolean canHandle(Processor processor)
Can this action handle the specified processor? Return true if this action is applicable.


getListener

java.awt.event.ActionListener getListener(Processor processor)
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').


getIcon

javax.swing.ImageIcon getIcon()
Return an Icon to represent this action, return null if you want to use the default icon (boring)