Class InstallKeyPanPlugIn
java.lang.Object
com.vividsolutions.jump.workbench.plugin.AbstractPlugIn
org.openjump.core.ui.plugin.view.InstallKeyPanPlugIn
- All Implemented Interfaces:
EnableChecked, Iconified, MultiShortcutEnabled, PlugIn, Recordable, ShortcutEnabled
Plug in for navigation with keyboards keys.
Navigation is as follows:
Arrows keys move the viewport.
Page down and up are zoom in and zoom out, respectively
Home key zooms in or out to full extent
Pan and zoom percentage is, by default, 20%
Navigation is as follows:
Arrows keys move the viewport.
Page down and up are zoom in and zoom out, respectively
Home key zooms in or out to full extent
Pan and zoom percentage is, by default, 20%
- Author:
- Ugo Taddei <taddei@lat-lon.de>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class AbstractPlugIn
shortcutKeys, shortcutModifiers -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorInstallKeyPanPlugIn(double panPercentage) Creates a new plug-in with pan_percentage as pan percentage value pan_percentage The value in percent of screen size to pan/zoom. -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(PlugInContext context) Execute the PlugIn.doubleGet the pan/zoom percentage, a value between 0 and 1.PlugIn[]voidinitialize(PlugInContext context) Called when Workbench starts up to allow plugins to initialize themselves.voidsetPanPercentage(double panPercent) Set the pan percentage.Methods inherited from class AbstractPlugIn
addParameter, createName, execute, execute, getBooleanParam, getContext, getDoubleParam, getEnableCheck, getIcon, getIcon, getIcon, getIntegerParam, getName, getParameter, getParameters, getShortcutKeys, getShortcutKeyStroke, getShortcutModifiers, getStringParam, getWorkbenchContext, isRollingBackInvalidEdits, isShortcutEnabled, reportNothingToUndoYet, setParameters, setShortcutKeys, setShortcutModifiers, toActionListener, toString
-
Field Details
-
sPAN_NORTH
-
sPAN_EAST
-
sPAN_SOUTH
-
sPAN_WEST
-
sZOOM_IN
-
sZOOM_OUT
-
sZOOM_EXT
-
sACCEPTED_VALUES
-
-
Constructor Details
-
InstallKeyPanPlugIn
public InstallKeyPanPlugIn()Default constructor -
InstallKeyPanPlugIn
public InstallKeyPanPlugIn(double panPercentage) Creates a new plug-in with pan_percentage as pan percentage value pan_percentage The value in percent of screen size to pan/zoom. Accepted values are in the range 0 invalid input: '<' percentage invalid input: '<'= 1
-
-
Method Details
-
initialize
Description copied from interface:PlugInCalled when Workbench starts up to allow plugins to initialize themselves.- Specified by:
initializein interfacePlugIn- Overrides:
initializein classAbstractPlugIn- Parameters:
context- context of the PlugIn- Throws:
Exception- if an exception occur during initialization
-
execute
Description copied from class:AbstractPlugInExecute the PlugIn.- 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:
-
getPanPercentage
public double getPanPercentage()Get the pan/zoom percentage, a value between 0 and 1. Deafult is 0.25 (=25%) -
setPanPercentage
public void setPanPercentage(double panPercent) Set the pan percentage. Legal values are between greater than 0 and less than or equal to 1.0- Parameters:
panPercent- The value in percent of screen size to pan/zoom. Accepted values are in the range 0 invalid input: '<' percentage invalid input: '<'= 1
-
getShortcutEnabledPlugins
- Specified by:
getShortcutEnabledPluginsin interfaceMultiShortcutEnabled
-