org.embl.ebi.escience.scuflui.workbench.scavenger.spi
Interface ScavengerActionSPI

All Known Implementing Classes:
BiomobyScavengerAction

public interface ScavengerActionSPI

SPI for actions capable of operating on a Scavenger object in the scavenger pane. These can then be gathered and presented in the appropriate context menus within the workbench to allow arbitrary operations such as scavenger configuration etc.

Author:
Stuart Owen

Method Summary
 boolean canHandle(Scavenger scavenger)
          Can this action handle the specified scavenger? 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(Scavenger scavenger)
          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(Scavenger scavenger)
Can this action handle the specified scavenger? Return true if this action is applicable.


getListener

java.awt.event.ActionListener getListener(Scavenger scavenger)
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 Scavenger 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)