net.sf.freecol.client.gui.action
Class ImprovementAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by net.sf.freecol.client.gui.action.FreeColAction
          extended by net.sf.freecol.client.gui.action.MapboardAction
              extended by net.sf.freecol.client.gui.action.UnitAction
                  extended by net.sf.freecol.client.gui.action.ImprovementAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, Option

public class ImprovementAction
extends UnitAction

An action for using the active unit to plow/clear a forest.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.freecol.client.gui.action.FreeColAction
FreeColAction.InnerMenuKeyListener
 
Field Summary
 ImprovementActionType iaType
           
 
Fields inherited from class net.sf.freecol.client.gui.action.FreeColAction
ACTION_ID, BUTTON_DISABLED_IMAGE, BUTTON_IMAGE, BUTTON_PRESSED_IMAGE, BUTTON_ROLLOVER_IMAGE, NO_MNEMONIC
 
Fields inherited from interface net.sf.freecol.common.option.Option
NO_ID
 
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
ImprovementAction(FreeColClient freeColClient, ImprovementActionType iaType)
          Creates this action.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Applies this action.
 void update()
          Updates the "enabled"-status with the value returned by shouldBeEnabled() and updates the name of the action.
 
Methods inherited from class net.sf.freecol.client.gui.action.FreeColAction
getAccelerator, getId, getKeyStrokeText, getMenuKeyListener, getMnemonic, getName, getShortDescription, getXMLElementTagName, isPreviewEnabled, readFromXML, readFromXMLElement, setAccelerator, setMnemonic, toString, toXML, toXMLElement
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.freecol.common.option.Option
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

iaType

public ImprovementActionType iaType
Constructor Detail

ImprovementAction

public ImprovementAction(FreeColClient freeColClient,
                         ImprovementActionType iaType)
Creates this action.

Parameters:
freeColClient - The main controller object for the client.
Method Detail

update

public void update()
Updates the "enabled"-status with the value returned by shouldBeEnabled() and updates the name of the action.

Overrides:
update in class FreeColAction

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Applies this action.

Parameters:
e - The ActionEvent.