org.geotools.swing.action
Class MapAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.geotools.swing.action.MapAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
Direct Known Subclasses:
InfoAction, PanAction, ResetAction, ZoomInAction, ZoomOutAction

public abstract class MapAction
extends javax.swing.AbstractAction

Base class for map pane actions; just provides a common initializing method and a reference to the map pane being serviced.

Since:
2.6
Version:
$Id: MapAction.java 33975 2009-09-24 03:28:17Z mbedward $
Author:
Michael Bedward
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
MapAction()
           
 
Method Summary
 JMapPane getMapPane()
          Get the map pane that this Action is working with
protected  void init(JMapPane mapPane, java.lang.String toolName, java.lang.String toolTip, java.lang.String iconImage)
          Called by sub-classes to set the map pane field and initialize the control action properties
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Constructor Detail

MapAction

public MapAction()
Method Detail

init

protected void init(JMapPane mapPane,
                    java.lang.String toolName,
                    java.lang.String toolTip,
                    java.lang.String iconImage)
Called by sub-classes to set the map pane field and initialize the control action properties

Parameters:
mapPane - the map pane that this action is working with
toolName - short (single word) tool name; may be null
toolTip - brief tool description for GUI tool tip
iconImage - path to the icon to display on the control

getMapPane

public JMapPane getMapPane()
Get the map pane that this Action is working with

Returns:
the map pane


Copyright © 1996-2010 Geotools. All Rights Reserved.