org.embl.ebi.escience.scuflui.actions
Class AbstractProcessorAction

java.lang.Object
  extended by org.embl.ebi.escience.scuflui.actions.AbstractProcessorAction
All Implemented Interfaces:
ProcessorActionSPI
Direct Known Subclasses:
AddParserAction, BiomobyAction, BiomobyObjectAction, BiomobyWidgetAction, ConfigureMobyServiceAction, FlattenListEditAction, SliceListEditAction, SoaplabDescriberPanel

public abstract class AbstractProcessorAction
extends java.lang.Object
implements ProcessorActionSPI

A simple abstract implementation of the ProcessorActionSPI which allows the extending class to simply specify a JComponent to be created in a standard UIUtils frame.

Author:
Tom Oinn

Constructor Summary
AbstractProcessorAction()
           
 
Method Summary
 void frameClosing()
          Add any actions to be performed on window close to here
abstract  javax.swing.JComponent getComponent(Processor processor)
          Implement this to define the component which will be created in the new UIUtils frame when the menu item, button or whatever is activated
 java.awt.Dimension getFrameLocation()
          Where should the frame open?
 java.awt.Dimension getFrameSize()
          How big should it be?
 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
 
Methods inherited from interface org.embl.ebi.escience.scuflui.spi.ProcessorActionSPI
canHandle, getDescription, getIcon
 

Constructor Detail

AbstractProcessorAction

public AbstractProcessorAction()
Method Detail

getListener

public final 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

getComponent

public abstract javax.swing.JComponent getComponent(Processor processor)
Implement this to define the component which will be created in the new UIUtils frame when the menu item, button or whatever is activated


getFrameLocation

public java.awt.Dimension getFrameLocation()
Where should the frame open?


getFrameSize

public java.awt.Dimension getFrameSize()
How big should it be?


frameClosing

public void frameClosing()
Add any actions to be performed on window close to here