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

public class InstallKeyPanPlugIn extends AbstractPlugIn implements MultiShortcutEnabled
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%
Author:
Ugo Taddei <taddei@lat-lon.de>
  • Field Details

    • sPAN_NORTH

      public static final String sPAN_NORTH
    • sPAN_EAST

      public static final String sPAN_EAST
    • sPAN_SOUTH

      public static final String sPAN_SOUTH
    • sPAN_WEST

      public static final String sPAN_WEST
    • sZOOM_IN

      public static final String sZOOM_IN
    • sZOOM_OUT

      public static final String sZOOM_OUT
    • sZOOM_EXT

      public static final String sZOOM_EXT
    • sACCEPTED_VALUES

      public static final String 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

      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 interface PlugIn
      Overrides:
      initialize in class AbstractPlugIn
      Parameters:
      context - context of the PlugIn
      Throws:
      Exception - if an exception occur during initialization
    • execute

      public boolean execute(PlugInContext context) throws Exception
      Description copied from class: AbstractPlugIn
      Execute the PlugIn.
      Specified by:
      execute in interface PlugIn
      Overrides:
      execute in class AbstractPlugIn
      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

      public PlugIn[] getShortcutEnabledPlugins()
      Specified by:
      getShortcutEnabledPlugins in interface MultiShortcutEnabled