com.vividsolutions.jump.workbench.ui.toolbox
Class ToolboxPlugIn

java.lang.Object
  extended by com.vividsolutions.jump.workbench.plugin.AbstractPlugIn
      extended by com.vividsolutions.jump.workbench.ui.toolbox.ToolboxPlugIn
All Implemented Interfaces:
PlugIn
Direct Known Subclasses:
BeanShellPlugIn, ConnectionManagerToolboxPlugIn, EditingPlugIn, WarpingPlugIn, ZoomBarPlugIn

public abstract class ToolboxPlugIn
extends AbstractPlugIn


Constructor Summary
ToolboxPlugIn()
           
 
Method Summary
 void createMainMenuItem(java.lang.String[] menuPath, javax.swing.Icon icon, WorkbenchContext context)
          Creates a menu item with a checkbox beside it that appears when the toolbox is visible.
 boolean execute(PlugInContext context)
          Toolbox subclasses can override this method to implement their own behaviour when the plug-in is called.
 ToolboxDialog getToolbox(WorkbenchContext context)
           
 
Methods inherited from class com.vividsolutions.jump.workbench.plugin.AbstractPlugIn
createName, execute, getName, initialize, toActionListener, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ToolboxPlugIn

public ToolboxPlugIn()
Method Detail

getToolbox

public ToolboxDialog getToolbox(WorkbenchContext context)
Returns:
the toolbox for this plug-in class.

execute

public boolean execute(PlugInContext context)
                throws java.lang.Exception
Toolbox subclasses can override this method to implement their own behaviour when the plug-in is called. Remember to call super.execute to make the toolbox visible.

Specified by:
execute in interface PlugIn
Overrides:
execute in class AbstractPlugIn
Returns:
true if the action completed, false if it was aborted. Used by ThreadedPlugIns to indicate that their #run method needn't be called next.
Throws:
java.lang.Exception - if a problem occurs during plug-in execution
See Also:
ThreadedPlugIn

createMainMenuItem

public void createMainMenuItem(java.lang.String[] menuPath,
                               javax.swing.Icon icon,
                               WorkbenchContext context)
                        throws java.lang.Exception
Creates a menu item with a checkbox beside it that appears when the toolbox is visible.

Parameters:
icon - null to leave unspecified
Throws:
java.lang.Exception