net.sf.freecol.client.gui.action
Class ActionManager
java.lang.Object
net.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.option.AbstractOption<OptionGroup>
net.sf.freecol.common.option.OptionGroup
net.sf.freecol.client.gui.action.ActionManager
- All Implemented Interfaces:
- Option
public class ActionManager
- extends OptionGroup
Stores all FreeColActions and retrieves them by ID.
| Methods inherited from class net.sf.freecol.common.option.OptionGroup |
add, getBoolean, getInteger, getName, getOption, getOptions, getShortDescription, getString, getValue, getXMLElementTagName, iterator, readFromXMLImpl, removeAll, setBoolean, setInteger, setString, setValue, toString, toXMLImpl |
| Methods inherited from class net.sf.freecol.common.model.FreeColObject |
addPropertyChangeListener, addPropertyChangeListener, dumpObject, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, getSpecification, hasAbility, hasAttribute, hasListeners, readAttributes, readChild, readChild, readChildren, readChildren, readFromArrayElement, readFromArrayElement, readFromListElement, readFromXML, readFromXMLElement, readFromXMLImpl, readFromXMLPartialImpl, removePropertyChangeListener, removePropertyChangeListener, save, save, setId, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, toXMLPartialImpl, writeAttribute, writeAttributes, writeChildren |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
logger
private static final java.util.logging.Logger logger
freeColClient
private FreeColClient freeColClient
ActionManager
public ActionManager(FreeColClient freeColClient)
- Creates a new
ActionManager.
- Parameters:
freeColClient - The main client controller.
initializeActions
public void initializeActions()
- This method adds all FreeColActions to the OptionGroup. If you
implement a new
FreeColAction, then you need to
add it in this method. Localization and a possible accelerator
need to be added to the strings file.
addSpecificationActions
public void addSpecificationActions(Specification specification)
- Adds the
FreeColActions that are provided by the
Specification. At the moment, this includes only
TileImprovements.
- Parameters:
specification - a Specification value
getFreeColAction
public FreeColAction getFreeColAction(java.lang.String id)
- Gets the
FreeColAction specified by the given
id.
- Parameters:
id - The string identifying the action.
- Returns:
- The
FreeColAction.
update
public void update()
- Updates every
FreeColAction this object keeps.
- See Also:
FreeColAction