Class AbstractPlugIn
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.plugin.AbstractPlugIn
-
- All Implemented Interfaces:
PlugIn
- Direct Known Subclasses:
AboutPlugIn
,AbstractSaveProjectPlugIn
,AddNewCategoryPlugIn
,AddNewLayerPlugIn
,AddWMSDemoBoxEasterEggPlugIn
,AddWMSQueryPlugIn
,AffineTransformPlugIn
,BoundaryMatchDataPlugIn
,BufferPlugIn
,CalculateAreasAndLengthsPlugIn
,ChangeCoordinateSystemPlugIn
,ChangeStylesPlugIn
,ClearSelectionPlugIn
,CloneWindowPlugIn
,CombineSelectedFeaturesPlugIn
,CopySelectedItemsPlugIn
,CopySelectedLayersToWarpingVectorsPlugIn
,CopyThisCoordinatePlugIn
,CustomFillPatternExamplePlugIn
,DeleteAllFeaturesPlugIn
,DeleteSelectedItemsPlugIn
,EditablePlugIn
,EditWMSQueryPlugIn
,ExplodeSelectedFeaturesPlugIn
,ExportImagePlugIn
,FeatureInfoPlugIn
,FeatureStatisticsPlugIn
,FirstTaskFramePlugIn
,GenerateLogPlugIn
,GeometryFunctionPlugIn
,InstallDelineationToolPlugIn
,InstallRendererPlugIn
,InstallSkinsPlugIn
,InstallStandardDataSourceQueryChoosersPlugIn
,InstallStandardFeatureTextWritersPlugIn
,InstallZoomBarPlugIn
,LayerableClipboardPlugIn
,LayerStatisticsPlugIn
,LoadDatasetToCategoryPlugIn
,MacroPlugIn
,MapToolTipsPlugIn
,MicroscopePlugIn
,MoveLayerablePlugIn
,NewTaskPlugIn
,OptionsPlugIn
,OutputWindowPlugIn
,OverlayPlugIn
,PasteItemsPlugIn
,PersistentBlackboardPlugIn
,RandomArrowsPlugIn
,RandomTrianglesPlugIn
,RedoPlugIn
,RemoveSelectedCategoriesPlugIn
,RemoveSelectedLayersPlugIn
,ScaleBarPlugIn
,SelectFeaturesInFencePlugIn
,ShortcutKeysPlugIn
,ShowTriangulationPlugIn
,TestColorThemingPlugIn
,ThreadedBasePlugIn
,ToolboxPlugIn
,UndoPlugIn
,UnionPlugIn
,ValidateSelectedLayersPlugIn
,VerticesInFencePlugIn
,ViewAttributesPlugIn
,ViewSchemaPlugIn
,WKTPlugIn
,ZoomNextPlugIn
,ZoomPreviousPlugIn
,ZoomToClickPlugIn
,ZoomToCoordinatePlugIn
,ZoomToFencePlugIn
,ZoomToFullExtentPlugIn
,ZoomToLayerPlugIn
,ZoomToSelectedItemsPlugIn
public abstract class AbstractPlugIn extends Object implements PlugIn
Default implementation of PlugIn, with useful functions for auto-generating a name, converting a PlugIn into an ActionListener (for use with JButtons, for example), and supporting undo.
-
-
Constructor Summary
Constructors Constructor Description AbstractPlugIn()
AbstractPlugIn(String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
createName(Class plugInClass)
static void
execute(UndoableCommand command, LayerManagerProxy layerManagerProxy)
protected void
execute(UndoableCommand command, PlugInContext context)
boolean
execute(PlugInContext context)
Performs the action for this plugin.String
getName()
Returns a very brief description of this PlugIn e.g.void
initialize(PlugInContext context)
Called when Workbench starts up to allow plugins to initialize themselves.protected boolean
isRollingBackInvalidEdits(PlugInContext context)
protected void
reportNothingToUndoYet(PlugInContext context)
Indicates that this plug-in either (1) is undoable but hasn't modified the system yet or (2) does not modify the system.static ActionListener
toActionListener(PlugIn plugIn, WorkbenchContext workbenchContext, TaskMonitorManager taskMonitorManager)
String
toString()
-
-
-
Constructor Detail
-
AbstractPlugIn
public AbstractPlugIn()
-
AbstractPlugIn
public AbstractPlugIn(String name)
-
-
Method Detail
-
execute
protected void execute(UndoableCommand command, PlugInContext context)
-
initialize
public void initialize(PlugInContext context) throws Exception
Description copied from interface:PlugIn
Called when Workbench starts up to allow plugins to initialize themselves.- Specified by:
initialize
in interfacePlugIn
- Throws:
Exception
-
execute
public boolean execute(PlugInContext context) throws Exception
Description copied from interface:PlugIn
Performs the action for this plugin. For threaded plugins with dialogs, this method contains the code to invoke the dialog. If the user cancels the dialog, this method should returnfalse
to prevent the run method from being called.- Specified by:
execute
in interfacePlugIn
- 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:
Exception
- if a problem occurs during plug-in execution- See Also:
ThreadedPlugIn
-
getName
public String getName()
Description copied from interface:PlugIn
Returns a very brief description of this PlugIn e.g. for display as a menu item
-
toActionListener
public static ActionListener toActionListener(PlugIn plugIn, WorkbenchContext workbenchContext, TaskMonitorManager taskMonitorManager)
- Parameters:
taskMonitorManager
- can be null if you do not wish to use the Task Monitor progress-reporting framework
-
execute
public static void execute(UndoableCommand command, LayerManagerProxy layerManagerProxy)
-
reportNothingToUndoYet
protected void reportNothingToUndoYet(PlugInContext context)
Indicates that this plug-in either (1) is undoable but hasn't modified the system yet or (2) does not modify the system. In either case, the undo history will be preserved. If this method is not called, then this plug-in will be assumed to be non-undoable, and the undo history will be truncated.
-
isRollingBackInvalidEdits
protected boolean isRollingBackInvalidEdits(PlugInContext context)
-
-