Class ToolboxPlugInV2

java.lang.Object
com.vividsolutions.jump.workbench.plugin.AbstractPlugIn
com.vividsolutions.jump.workbench.ui.toolbox.ToolboxPlugInV2
All Implemented Interfaces:
CheckBoxed, EnableChecked, Iconified, PlugIn, Recordable, ShortcutEnabled
Direct Known Subclasses:
PythonToolsPlugIn

public abstract class ToolboxPlugInV2 extends AbstractPlugIn implements CheckBoxed
pretty much ToolboxPlugIn but cleaned up plus propagating errors from initializeToolbox() -> getToolbox() -> execute() making implementations easier and more failsafe
  • Constructor Details

    • ToolboxPlugInV2

      public ToolboxPlugInV2()
  • Method Details

    • getToolbox

      public ToolboxDialog getToolbox() throws Exception
      Returns:
      the toolbox for this plug-in class.
      Throws:
      Exception - if an Exception occurs during Toolbox initialization
    • initializeToolbox

      protected abstract ToolboxDialog initializeToolbox() throws Exception
      Throws:
      Exception
    • execute

      public boolean execute(PlugInContext context) throws 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
      Parameters:
      context - context of this PlugIn
      Returns:
      true if the PlugIn has been executed
      Throws:
      Exception - if an Exception occurs during execution
      See Also:
    • getEnableCheck

      public EnableCheck getEnableCheck()
      Description copied from class: AbstractPlugIn
      Use reflection to find an EnableCheck object defined by old method createEnableCheck in this plugin.
      Specified by:
      getEnableCheck in interface EnableChecked
      Overrides:
      getEnableCheck in class AbstractPlugIn
      Returns:
      the EnableCheck defined the old way