Class ActionManager

    • Field Detail

      • logger

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

      • ActionManager

        public ActionManager​(FreeColClient freeColClient)
        Creates a new ActionManager.
        Parameters:
        freeColClient - The FreeColClient for the game.
    • Method Detail

      • initializeActions

        public void initializeActions​(InGameController inGameController,
                                      ConnectController connectController)
        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.
        Parameters:
        inGameController - The client InGameController.
        connectController - The client ConnectController.
      • addSpecificationActions

        public void addSpecificationActions​(Specification spec)
        Adds the FreeColActions that are provided by the Specification. At the moment, this includes only TileImprovements.
        Parameters:
        spec - The Specification to refer to.
      • getFreeColAction

        public FreeColAction getFreeColAction​(java.lang.String id)
        Gets the FreeColAction specified by the given identifier.
        Parameters:
        id - The object identifier.
        Returns:
        The FreeColAction or null if not present.
      • update

        public void update()
        Updates every FreeColAction this object keeps.
        See Also:
        FreeColAction
      • makeMiniMapButtons

        public java.util.List<UnitButton> makeMiniMapButtons()
        Make the buttons needed by the map controls for the mini map.
        Returns:
        A list of UnitButtons.
      • makeUnitActionButtons

        public java.util.List<UnitButton> makeUnitActionButtons​(Specification spec)
        Make the buttons needed by the map controls for unit actions.
        Parameters:
        spec - The Specification to query.
        Returns:
        A list of UnitButtons.
      • refreshResources

        public void refreshResources()