Class PanAction

All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class PanAction extends MapAction
An action for connect a control (probably a JButton) to the PanTool for panning the map with mouse drags.
Since:
2.6
Author:
Michael Bedward
See Also:
  • Constructor Details

    • PanAction

      public PanAction(MapPane mapPane)
      Constructor. The associated control will be labelled with an icon.
      Parameters:
      mapPane - the map pane being serviced by this action
    • PanAction

      public PanAction(MapPane mapPane, boolean showToolName)
      Constructor. The associated control will be labelled with an icon and, optionally, the tool name.
      Parameters:
      mapPane - the map pane being serviced by this action
      showToolName - set to true for the control to display the tool name
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent ev)
      Called when the associated control is activated. Leads to the map pane's cursor tool being set to a PanTool object
      Parameters:
      ev - the event (not used)