org.globus.cog.util.plugin
Interface Plugin


public interface Plugin

This class allows panels to be plugged into frames TODO: This should idealy be in CoG


Method Summary
 void destroy()
           This method should always be called by when closing to ensure the plugin can cleanly exit.
 Action getCloseAction()
           The action used to close this plugin.
 Component getComponent()
          Returns the component that will be added
 ImageIcon getImageIconC16x16()
          Returns the Icon for this plugin
 ImageIcon getImageIconC32x32()
          Returns the Icon for this plugin
 JMenuBar getMenuBar()
          Returns the MenuBar for this plugin
 String getTitle()
          Get's the title for the plugin
 JToolBar getToolBar()
          Returns the toolbar for this plugin
 void setCloseAction(Action value)
          Sets the action to close this plugin
 

Method Detail

getComponent

public Component getComponent()
Returns the component that will be added

Returns:

getToolBar

public JToolBar getToolBar()
Returns the toolbar for this plugin

Returns:

getImageIconC32x32

public ImageIcon getImageIconC32x32()
Returns the Icon for this plugin

Returns:

getImageIconC16x16

public ImageIcon getImageIconC16x16()
Returns the Icon for this plugin

Returns:

getTitle

public String getTitle()
Get's the title for the plugin

Returns:

getMenuBar

public JMenuBar getMenuBar()
Returns the MenuBar for this plugin

Returns:

getCloseAction

public Action getCloseAction()

The action used to close this plugin. This is good so the plugin knows how to close its frame properly (ie an error occurs, or a command should close it). Also it doesn't need to know where it is ie a frame, an internal frame, etc. It is up to the eternal environment to set this action (similar to JFrame.setDefaultCloseOperation).

Returns:

setCloseAction

public void setCloseAction(Action value)
Sets the action to close this plugin

Returns:

destroy

public void destroy()

This method should always be called by when closing to ensure the plugin can cleanly exit.