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

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
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, Option<FreeColAction>
Direct Known Subclasses:
DeclareIndependenceAction, EndTurnAction, EuropeAction, ExecuteGotoOrdersAction, FindSettlementAction, LoadAction, MiniMapZoomInAction, MiniMapZoomOutAction, MoveAction, NewEmptyMapAction, SelectableAction, TilePopupAction, ToggleViewModeAction, TradeRouteAction, UnitAction, UnloadAction

public abstract class MapboardAction
extends FreeColAction

Super class for all actions that should be disabled when the mapboard is not selected.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.freecol.client.gui.action.FreeColAction
FreeColAction.InnerMenuKeyListener
 
Field Summary
private static java.util.logging.Logger logger
           
 
Fields inherited from class net.sf.freecol.client.gui.action.FreeColAction
ACTION_ID, BUTTON_DISABLED_IMAGE, BUTTON_IMAGE, BUTTON_PRESSED_IMAGE, BUTTON_ROLLOVER_IMAGE, freeColClient, gui, NO_MNEMONIC
 
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
protected MapboardAction(FreeColClient freeColClient, GUI gui, java.lang.String id)
          Creates a new MapboardAction.
 
Method Summary
protected  boolean shouldBeEnabled()
          Checks if this action should be enabled.
 
Methods inherited from class net.sf.freecol.client.gui.action.FreeColAction
addImageIcons, clone, getAccelerator, getFreeColClient, getId, getKeyStrokeText, getMenuKeyListener, getMnemonic, getName, getShortDescription, getValue, getXMLElementTagName, hasOrderButtons, readFromXML, readFromXMLImpl, setAccelerator, setMnemonic, setValue, toString, toXML, toXMLImpl, update
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Field Detail

logger

private static final java.util.logging.Logger logger
Constructor Detail

MapboardAction

protected MapboardAction(FreeColClient freeColClient,
                         GUI gui,
                         java.lang.String id)
Creates a new MapboardAction.

Parameters:
freeColClient - The main controller object for the client
id - a String value
Method Detail

shouldBeEnabled

protected boolean shouldBeEnabled()
Checks if this action should be enabled.

Overrides:
shouldBeEnabled in class FreeColAction
Returns:
true if the mapboard is selected.