com.vividsolutions.jump.workbench.plugin
Class AbstractPlugIn
java.lang.Object
com.vividsolutions.jump.workbench.plugin.AbstractPlugIn
- All Implemented Interfaces:
- PlugIn
- Direct Known Subclasses:
- AboutPlugIn, AbstractSaveProjectPlugIn, AddImageLayerPlugIn, AddNewCategoryPlugIn, AddNewLayerPlugIn, AddSIDLayerPlugIn, AddWMSDemoBoxEasterEggPlugIn, AffineTransformPlugIn, AttributeQueryPlugIn, AutoAssignAttributePlugIn, AutoCompletePolygonPlugIn, BeanToolsPlugIn, BlendLineStringsPlugIn, BoundaryMatchDataPlugIn, BufferPlugIn, CalculateAreasAndLengthsPlugIn, ChangeCoordinateSystemPlugIn, ChangeLayerableNamePlugIn, ChangeRasterImagePropertiesPlugIn, ChangeSRIDPlugIn, ChangeStylesPlugIn, ClearSelectionPlugIn, ClipToFencePlugIn, CloneWindowPlugIn, CombineSelectedFeaturesPlugIn, CombineSelectedLayersPlugIn, ConstrainedMoveVertexPlugIn, ConvexHullPlugIn, ConvexHullPlugIn, CopyBBoxPlugin, CopySelectedItemsPlugIn, CopySelectedLayersToWarpingVectorsPlugIn, CopyStylesPlugIn, CopyThisCoordinatePlugIn, CreateThiessenPolygonsPlugIn, CustomFillPatternExamplePlugIn, CutPolygonSIGLEPlugIn, DeeChangeStylesPlugIn, DeleteAllFeaturesPlugIn, DeleteDuplicateGeometriesPlugIn, DeleteEmptyGeometriesPlugIn, DeleteSelectedItemsPlugIn, DrawCircleWithGivenRadiusPlugIn, DrawConstrainedArcPlugIn, DrawConstrainedCirclePlugIn, DrawConstrainedLineStringPlugIn, DrawConstrainedPolygonPlugIn, EditablePlugIn, EditAttributeByFormulaPlugIn, EditSelectedSidePlugIn, EditWMSQueryPlugIn, EnsureAllLayersHaveSRIDStylePlugIn, ExplodeSelectedFeaturesPlugIn, ExportEnvelopeAsGeometryPlugIn, ExportImagePlugIn, ExtractCommonBoundaryBetweenPolysPlugIn, ExtractLayerInFence, ExtractLayersByAttribute, ExtractLayersByGeometry, ExtractPointsPlugIn, ExtractSelectedPartOfImage, FeatureInfoPlugIn, FeatureStatisticsPlugIn, GenerateLogPlugIn, GeometryFunctionPlugIn, ImageLayerManagerPlugIn, ImportArcMapStylePlugIn, ImportSLDPlugIn, InstallDatastoreLayerRendererHintsPlugIn, InstallKeyPanPlugIn, InstallReferencedImageFactoriesPlugin, InstallRendererPlugIn, InstallSkinsPlugIn, InstallStandardDataSourceQueryChoosersPlugIn, InstallStandardFeatureTextWritersPlugIn, InstallZoomBarPlugIn, JoinWithArcPlugIn, LayerableClipboardPlugIn, LayerableClipboardPlugIn, LayerPropertiesPlugIn, LayerStatisticsPlugIn, LayerStyle2SLDPlugIn, LineSimplifyJTS15AlgorithmPlugIn, LoadSextanteRasterImagePlugIn, MacroPlugIn, MapToolTipPlugIn, MapToolTipsPlugIn, MeasureM_FPlugIn, MergeTwoSelectedPolygonsPlugIn, MicroscopePlugIn, MoveAlongAnglePlugIn, MoveCategoryOneDown, MoveCategoryOneUp, MoveCategoryToBottom, MoveCategoryToTop, MoveLayerablePlugIn, MultiRingBufferSelectedPlugIn, NewTaskPlugIn, NoteToolPlugIn, OptionsPlugIn, OutputWindowPlugIn, OverlayPlugIn, PasteItemsPlugIn, PasteStylesPlugIn, PersistentBlackboardPlugIn, PlumePlugIn, ProjectionPlugIn, RandomArrowsPlugIn, RandomTrianglesPlugIn, RedoPlugIn, ReducePointsISAPlugIn, RefreshDataStoreLayerPlugin, RemoveSelectedCategoriesPlugIn, RemoveSelectedLayersPlugIn, RemoveSelectedRasterImageLayersPlugIn, ReplaceValuePlugIn, ReplicateSelectedItemsPlugIn, RotatePlugIn, RotateSelectedItemPlugIn, SaveDatasetsPlugIn, SaveImageAsSVGPlugIn, SaveLegendPlugIn, SaveRasterImageAsImagePlugIn, ScaleBarPlugIn, ScaleSelectedItemsPlugIn, SearchAllAttributes, SelectablePlugIn, SelectAllLayerItemsPlugIn, SelectByTypePlugIn, SelectFeaturesInFencePlugIn, SelectItemsByCircleFromSelectedLayersPlugIn, SelectItemsByFenceFromSelectedLayersPlugIn, SelectLayersWithSelectedItemsPlugIn, SelectOneItemPlugIn, SetCategoryVisibilityPlugIn, ShortcutKeysPlugIn, ShowFullPathPlugIn, ShowScalePlugIn, ShowTriangulationPlugIn, SimpleQueryPlugIn, SimplifyPolygonCoveragePlugIn, SortCategoryAbstractPlugIn, SortCategoryRestorePlugIn, SortCategorySavePlugIn, SpatialJoinPlugIn, SpatialQueryPlugIn, SplitPolygonPlugIn, StandardPirolPlugIn, StatisticOverViewPlugIn, TestColorThemingPlugIn, ThreadedBasePlugIn, ToggleRasterImageVisibility, ToggleVisiblityPlugIn, ToolboxPlugIn, UndoPlugIn, UnionByAttributePlugIn, UnionPlugIn, ValidateSelectedLayersPlugIn, VerticesInFencePlugIn, ViewAttributesPlugIn, ViewSchemaPlugIn, WarpImageToFencePlugIn, WKTPlugIn, ZoomNextPlugIn, ZoomPreviousPlugIn, ZoomToClickPlugIn, ZoomToCoordinatePlugIn, ZoomToFencePlugIn, ZoomToFullExtentPlugIn, ZoomToLayerPlugIn, ZoomToRasterImagePlugIn, ZoomToScalePlugIn, ZoomToSelectedItemsPlugIn, ZoomToWMSPlugIn
public abstract class AbstractPlugIn
- extends java.lang.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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractPlugIn
public AbstractPlugIn()
AbstractPlugIn
public AbstractPlugIn(java.lang.String name)
execute
protected void execute(UndoableCommand command,
PlugInContext context)
initialize
public void initialize(PlugInContext context)
throws java.lang.Exception
- Description copied from interface:
PlugIn
- Called when Workbench starts up to allow plugins to initialize themselves.
- Specified by:
initialize in interface PlugIn
- Throws:
java.lang.Exception
execute
public boolean execute(PlugInContext context)
throws java.lang.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 return
false to prevent the run method
from being called.
- Specified by:
execute in interface PlugIn
- 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
getName
public java.lang.String getName()
- Description copied from interface:
PlugIn
- Returns a very brief description of this PlugIn e.g. for display as a menu item
- Specified by:
getName in interface PlugIn
- Returns:
- the class name, minus "PlugIn", with
spaces inserted at the appropriate point before each
uppercase+lowercase and lowercase+uppercase combination.
createName
public static java.lang.String createName(java.lang.Class plugInClass)
toActionListener
public static java.awt.event.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)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
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)