Class AbstractPlugIn
java.lang.Object
com.vividsolutions.jump.workbench.plugin.AbstractPlugIn
- All Implemented Interfaces:
EnableChecked, Iconified, PlugIn, Recordable, ShortcutEnabled
- Direct Known Subclasses:
AboutPlugIn, AbstractSaveProjectPlugIn, AbstractUiPlugIn, AdditionalResultsPlugIn, AddNewCategoryPlugIn, AddNewLayerPlugIn, AddNewLayerViewPlugIn, AddWMSDemoBoxEasterEggPlugIn, AdvancedMeasurePlugin, AffineTransformPlugIn, ArrangeViewsPlugIn, AttributeQueryPlugIn, AutoCompletePolygonPlugIn, BeanToolsPlugIn, BlendLineStringsPlugIn, BoundaryMatchDataPlugIn, CalculateAreasAndLengthsPlugIn, CalcVarianceAndMeanPerClassPlugIn, CenterZoomPlugIn, ChangeCoordinateSystemPlugIn, ChangeLayerableNamePlugIn, ChangeRasterImagePropertiesPlugIn, ChangeSRIDPlugIn, ChangeStylesPlugIn, ClassifyAttributesPlugIn, ClearSelectionPlugIn, ClipToFencePlugIn, CloneWindowPlugIn, CombineSelectedFeaturesPlugIn, CombineSelectedLayersPlugIn, ConstrainedMoveVertexPlugIn, ConvexHullPlugIn, ConvexHullPlugIn, CopyBBoxPlugin, CopySchemaPlugIn, CopySelectedItemsPlugIn, CopySelectedLayersToWarpingVectorsPlugIn, CopyStylesPlugIn, CopyThisCoordinatePlugIn, CreateBarPlotPlugIn, CreateHistogramPlugIn, CreateLatticeFromSelectedImageLayerPlugIn, CreatePolygonGridFromSelectedImageLayerPlugIn, CreateScatterPlotPlugIn, CreateThiessenPolygonsPlugIn, CustomFillPatternExamplePlugIn, CutFeaturesPlugIn, CutPolygonSIGLEPlugIn, DeeChangeStylesPlugIn, DeleteAllFeaturesPlugIn, DeleteDuplicateGeometriesPlugIn, DeleteEmptyGeometriesPlugIn, DeleteSelectedItemsPlugIn, DrawCircleWithGivenRadiusPlugIn, DrawConstrainedArcPlugIn, DrawConstrainedCirclePlugIn, DrawConstrainedLineStringPlugIn, DrawConstrainedPolygonPlugIn, DuplicateItemPlugIn, EditablePlugIn, EditAttributeByFormulaPlugIn, EditSelectedSidePlugIn, EditWMSQueryPlugIn, EnsureAllLayersHaveSRIDStylePlugIn, ExplodeSelectedFeaturesPlugIn, ExportEnvelopeAsGeometryPlugIn, ExportImagePlugIn, ExportLayerableEnvelopeAsGeometryPlugIn, ExtractCommonBoundaryBetweenPolysPlugIn, ExtractLayerInFence, ExtractLayersByAttribute, ExtractPointsPlugIn, ExtractSelectedPartOfImage, FeatureInfoPlugIn, FeatureStatisticsPlugIn, FillPolygonPlugIn, FirstTaskFramePlugIn, GCPlugin, GenerateLogPlugIn, GeometryFunctionPlugIn, GeometrySnapperPlugIn, HistogramPlugIn, ImageLayerManagerPlugIn, ImportArcMapStylePlugIn, ImportSLDPlugIn, InstallDatastoreLayerRendererHintsPlugIn, InstallDummyReaderPlugIn, InstallKeyPanPlugIn, InstallRendererPlugIn, InstallSkinsPlugIn, InstallStandardDataSourceQueryChoosersPlugIn, InstallStandardFeatureTextWritersPlugIn, InstallZoomBarPlugIn, InvertSelectionPlugIn, JoinWithArcPlugIn, LayerableClipboardPlugIn, LayerableClipboardPlugIn, LayerableStylePlugIn, LayerPropertiesPlugIn, LayerStatisticsPlugIn, LayerStyle2SLDPlugIn, LegendPlugIn, MacroPlugIn, MapToolTipPlugIn, MapToolTipsPlugIn, MeasureM_FPlugIn, MeasureSelectedPlugIn, MergeSelectedFeaturesPlugIn, MergeTwoSelectedPolygonsPlugIn, MicroscopePlugIn, MoveAlongAnglePlugIn, MoveCategoryOneDown, MoveCategoryOneUp, MoveCategoryToBottom, MoveCategoryToTop, MoveLayerablePlugIn, MoveSelectedLayersPlugIn, MultiRingBufferSelectedPlugIn, NewLayerPropertiesPlugIn, NewTaskPlugIn, NorthArrowPlugIn, NoteToolPlugIn, OptionsPlugIn, OutputWindowPlugIn, OverlayPlugIn, PanToSelectedItemsPlugIn, PasteItemsPlugIn, PasteSchemaPlugIn, PasteStylesPlugIn, PersistentBlackboardPlugIn, PlumePlugIn, PointsToPathsPlugIn, ProjectionPlugIn, ProjectiveTransformPlugIn, RandomArrowsPlugIn, RandomTrianglesPlugIn, RasterColorEditorPlugIn, RasterImageLayerPropertiesPlugIn, RasterizePlugIn, RasterQueryPlugIn, RedoPlugIn, ReducePointsISAPlugIn, RefreshDataStoreLayerPlugin, RemodelerPlugIn, RemoveSelectedCategoriesPlugIn, RemoveSelectedLayersPlugIn, RemoveSelectedRasterImageLayersPlugIn, ReplaceValuePlugIn, ReplicateSelectedItemsPlugIn, ReverseOrientationPlugIn, RotatePlugIn, RotateSelectedItemPlugIn, SaveDatasetsPlugIn, SaveImageAsSVGPlugIn, SaveLayersWithoutDataSourcePlugIn, SaveLegendPlugIn, SaveRasterImageAsImagePlugIn, ScaleBarPlugIn, ScaleSelectedItemsPlugIn, SearchAllAttributes, SearchCommandPlugIn, SelectablePlugIn, SelectAllLayerItemsPlugIn, SelectAllModifiedFeaturesPlugIn, SelectAllOrderedFeaturesFromAttributeTablePlugIn, SelectByTypePlugIn, SelectFeaturesInFencePlugIn, SelectGeometryCollectionsPlugIn, SelectItemsByCircleFromSelectedLayersPlugIn, SelectItemsByFenceFromSelectedLayersPlugIn, SelectLayersWithSelectedItemsPlugIn, SelectMultiItemsPlugIn, SelectOneItemPlugIn, SetCategoryVisibilityPlugIn, ShortcutKeysPlugIn, ShowFullPathPlugIn, ShowScalePlugIn, ShowTriangulationPlugIn, ShowViewCenterPlugIn, SimpleQueryPlugIn, SimplifyPolygonCoveragePlugIn, SimplifyWithJTSAlgorithmPlugIn, SortCategoryAbstractPlugIn, SortCategoryRestorePlugIn, SortCategorySavePlugIn, SpatialJoinPlugIn, SpatialQueryPlugIn, SplitPolygonPlugIn, StandardPirolPlugIn, StartMacroPlugIn, StatisticOverViewPlugIn, StopMacroPlugIn, TaskPropertiesPlugIn, TestColorThemingPlugIn, ThreadedBasePlugIn, ToggleRasterImageVisibility, ToggleVisibilityPlugIn, ToolboxPlugIn, ToolboxPlugInV2, UndoPlugIn, UnionPlugIn, UniqueFeatureInfoPlugIn, ValidateSelectedLayersPlugIn, VerticesInFencePlugIn, ViewAttributesPlugIn, ViewOptionsPlugIn, ViewSchemaPlugIn, WarpImageToFencePlugIn, WKTPlugIn, WMSLegendPlugIn, WMSStylePlugIn, WorkbenchFrame.ExitPlugin, ZoomInPlugIn, ZoomNextPlugIn, ZoomOutPlugIn, ZoomPreviousPlugIn, ZoomToClickPlugIn, ZoomToCoordinatePlugIn, ZoomToFencePlugIn, ZoomToFullExtentPlugIn, ZoomToLayerPlugIn, ZoomToRasterImagePlugIn, ZoomToScalePlugIn, ZoomToSelectedItemsPlugIn, ZoomToWMSLayerPlugIn, ZoomToWMSPlugIn
public abstract class AbstractPlugIn
extends Object
implements PlugIn, ShortcutEnabled, EnableChecked, Iconified, Recordable
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParameter(String name, Object value) static StringcreateName(Class<? extends PlugIn> plugInClass) static voidexecute(UndoableCommand command, LayerManagerProxy layerManagerProxy) protected voidexecute(UndoableCommand command, PlugInContext context) booleanexecute(PlugInContext context) Execute the PlugIn.getBooleanParam(String name) protected PlugInContextgetDoubleParam(String name) Use reflection to find an EnableCheck object defined by old method createEnableCheck in this plugin.getIcon()Plugin icon assumed to be 16x16 by defaultgetIcon(int height) Use reflection to find the icon defined the old way by method getIcon or by attribute ICON.getIntegerParam(String name) getName()Returns a very brief description of this PlugIn e.g. for display as a menu itemgetParameter(String name) final intConvenience Method for getShortcutKeys() and getShortcutModifiers()final intgetStringParam(String name) protected WorkbenchContextvoidinitialize(PlugInContext context) Called when Workbench starts up to allow plugins to initialize themselves.protected booleanisRollingBackInvalidEdits(PlugInContext context) booleanprotected voidreportNothingToUndoYet(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.voidsetParameters(Map<String, Object> map) Set parameters with which to execute a plugin.voidsetShortcutKeys(int shortcutKeys) voidsetShortcutModifiers(int shortcutModifiers) static ActionListenertoActionListener(PlugIn plugIn, WorkbenchContext workbenchContext, TaskMonitorManager taskMonitorManager) toString()
-
Field Details
-
shortcutModifiers
protected int shortcutModifiers -
shortcutKeys
protected int shortcutKeys
-
-
Constructor Details
-
AbstractPlugIn
public AbstractPlugIn() -
AbstractPlugIn
-
-
Method Details
-
addParameter
-
getParameter
-
getBooleanParam
-
getIntegerParam
-
getDoubleParam
-
getStringParam
-
setParameters
Description copied from interface:RecordableSet parameters with which to execute a plugin.- Specified by:
setParametersin interfaceRecordable- Parameters:
map- a map of parameters
-
getParameters
-
execute
-
initialize
Description copied from interface:PlugInCalled when Workbench starts up to allow plugins to initialize themselves.- Specified by:
initializein interfacePlugIn- Parameters:
context- context of the PlugIn- Throws:
Exception- if an exception occur during initialization
-
execute
Execute the PlugIn. -
reportNothingToUndoYet
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.- Parameters:
context- plugin context
-
isRollingBackInvalidEdits
-
isShortcutEnabled
public boolean isShortcutEnabled()- Specified by:
isShortcutEnabledin interfaceShortcutEnabled
-
getShortcutModifiers
public final int getShortcutModifiers()- Specified by:
getShortcutModifiersin interfaceShortcutEnabled
-
setShortcutModifiers
public void setShortcutModifiers(int shortcutModifiers) - Specified by:
setShortcutModifiersin interfaceShortcutEnabled
-
getShortcutKeys
public final int getShortcutKeys()- Specified by:
getShortcutKeysin interfaceShortcutEnabled
-
setShortcutKeys
public void setShortcutKeys(int shortcutKeys) - Specified by:
setShortcutKeysin interfaceShortcutEnabled
-
getShortcutKeyStroke
Description copied from interface:ShortcutEnabledConvenience Method for getShortcutKeys() and getShortcutModifiers()- Specified by:
getShortcutKeyStrokein interfaceShortcutEnabled- Returns:
- the KeyStroke associated to the shortcut
-
getEnableCheck
Use reflection to find an EnableCheck object defined by old method createEnableCheck in this plugin.- Specified by:
getEnableCheckin interfaceEnableChecked- Returns:
- the EnableCheck defined the old way
-
getIcon
-
getIcon
-
getIcon
-
getName
Description copied from interface:PlugInReturns a very brief description of this PlugIn e.g. for display as a menu item -
toString
-
createName
-
toActionListener
public static ActionListener toActionListener(PlugIn plugIn, WorkbenchContext workbenchContext, TaskMonitorManager taskMonitorManager) - Parameters:
plugIn- the pluginworkbenchContext- context of the applicationtaskMonitorManager- can be null if you do not wish to use the Task Monitor progress-reporting framework- Returns:
- an ActionListener for this PlugIn
-
execute
-
getContext
-
getWorkbenchContext
-