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 muchToolboxPlugInbut cleaned up plus propagating errors from initializeToolbox() -> getToolbox() -> execute() making implementations easier and more failsafe
-
-
Field Summary
-
Fields inherited from class com.vividsolutions.jump.workbench.plugin.AbstractPlugIn
shortcutKeys, shortcutModifiers
-
-
Constructor Summary
Constructors Constructor Description ToolboxPlugInV2()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanexecute(PlugInContext context)Toolbox subclasses can override this method to implement their own behaviour when the plug-in is called.EnableCheckgetEnableCheck()Use reflection to find an EnableCheck object defined by old method createEnableCheck in this plugin.ToolboxDialoggetToolbox()protected abstract ToolboxDialoginitializeToolbox()-
Methods inherited from class com.vividsolutions.jump.workbench.plugin.AbstractPlugIn
addParameter, createName, execute, execute, getBooleanParam, getContext, getDoubleParam, getIcon, getIcon, getIcon, getIntegerParam, getName, getParameter, getParameters, getShortcutKeys, getShortcutKeyStroke, getShortcutModifiers, getStringParam, getWorkbenchContext, initialize, isRollingBackInvalidEdits, isShortcutEnabled, reportNothingToUndoYet, setParameters, setShortcutKeys, setShortcutModifiers, toActionListener, toString
-
-
-
-
Method Detail
-
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:
executein interfacePlugIn- Overrides:
executein classAbstractPlugIn- Parameters:
context- context of this PlugIn- Returns:
- true if the PlugIn has been executed
- Throws:
Exception- if an Exception occurs during execution- See Also:
ThreadedPlugIn
-
getEnableCheck
public EnableCheck getEnableCheck()
Description copied from class:AbstractPlugInUse reflection to find an EnableCheck object defined by old method createEnableCheck in this plugin.- Specified by:
getEnableCheckin interfaceEnableChecked- Overrides:
getEnableCheckin classAbstractPlugIn- Returns:
- the EnableCheck defined the old way
-
-