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

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.SelectableAction
                  extended by net.sf.freecol.client.gui.action.MapControlsAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, Option<FreeColAction>

public class MapControlsAction
extends SelectableAction

An action for displaying the map controls.

See Also:
MapControls, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.freecol.client.gui.action.FreeColAction
FreeColAction.InnerMenuKeyListener
 
Field Summary
static java.lang.String id
           
private  MapControls mapControls
           
 
Fields inherited from class net.sf.freecol.client.gui.action.SelectableAction
selected
 
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
MapControlsAction(FreeColClient freeColClient, GUI gui)
          Creates this action.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Applies this action.
 MapControls getMapControls()
          Returns The MapControls object.
private  void showMapControls(boolean value)
           
 void update()
          Updates the "enabled"-status and calls showMapControls(boolean).
 
Methods inherited from class net.sf.freecol.client.gui.action.SelectableAction
isSelected, setSelected, shouldBeSelected, updateOption
 
Methods inherited from class net.sf.freecol.client.gui.action.MapboardAction
shouldBeEnabled
 
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
 
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
 

Field Detail

id

public static final java.lang.String id
See Also:
Constant Field Values

mapControls

private MapControls mapControls
Constructor Detail

MapControlsAction

MapControlsAction(FreeColClient freeColClient,
                  GUI gui)
Creates this action.

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

update

public void update()
Updates the "enabled"-status and calls showMapControls(boolean).

Overrides:
update in class SelectableAction

getMapControls

public MapControls getMapControls()
Returns The MapControls object.

Returns:
The MapControls object.

actionPerformed

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

Parameters:
e - The ActionEvent.

showMapControls

private void showMapControls(boolean value)