org.geotools.swing.action
Class ResetAction

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

public class ResetAction
extends MapAction

An action for connect a control (probably a JButton) to the JMapPane.reset() method which sets the bounds of the map area to include the full extent of all map layers

Since:
2.6
Version:
$Id: ResetAction.java 34138 2009-10-13 06:35:19Z mbedward $
Author:
Michael Bedward
See Also:
Serialized Form

Field Summary
static java.lang.String ICON_IMAGE
          Icon for the control
static java.lang.String TOOL_NAME
          Name for this tool
static java.lang.String TOOL_TIP
          Tool tip text
 
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
ResetAction(JMapPane mapPane)
          Constructor.
ResetAction(JMapPane mapPane, boolean showToolName)
          Constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ev)
          Called when the control is activated.
 
Methods inherited from class org.geotools.swing.action.MapAction
getMapPane, init
 
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
 

Field Detail

TOOL_NAME

public static final java.lang.String TOOL_NAME
Name for this tool


TOOL_TIP

public static final java.lang.String TOOL_TIP
Tool tip text


ICON_IMAGE

public static final java.lang.String ICON_IMAGE
Icon for the control

See Also:
Constant Field Values
Constructor Detail

ResetAction

public ResetAction(JMapPane mapPane)
Constructor. The associated control will be labelled with an icon.

Parameters:
mapPane - the map pane being serviced by this action

ResetAction

public ResetAction(JMapPane 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 Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ev)
Called when the control is activated. Calls the map pane to reset the display

Parameters:
ev - the event (not used)


Copyright © 1996-2010 Geotools. All Rights Reserved.