Class CornerMapControls


  • public final class CornerMapControls
    extends MapControls
    A collection of panels and buttons that are used to provide the user with a more detailed view of certain elements on the map and also to provide a means of input in case the user can't use the keyboard.
    • Field Detail

      • logger

        private static final java.util.logging.Logger logger
      • compassRose

        private final javax.swing.JLabel compassRose
        The compass rose graphic.
      • miniMapSkin

        private java.awt.Image miniMapSkin
        A skin for the mini map.
    • Constructor Detail

      • CornerMapControls

        public CornerMapControls​(FreeColClient freeColClient)
        The basic constructor.
        Parameters:
        freeColClient - The FreeColClient for the game.
    • Method Detail

      • updateLayoutIfNeeded

        public void updateLayoutIfNeeded()
        Updates the layout with possibly a new skin and/or size.
        Overrides:
        updateLayoutIfNeeded in class MapControls
      • getComponentsToAdd

        public java.util.List<java.awt.Component> getComponentsToAdd​(java.awt.Dimension newSize)
        Prepare and return a list of map controls components to add to the canvas.
        Specified by:
        getComponentsToAdd in class MapControls
        Parameters:
        newSize - The Dimension of the canvas.
        Returns:
        A list of Components to add to the canvas.
      • getComponentsPresent

        public java.util.List<java.awt.Component> getComponentsPresent()
        Prepare and return a list of map controls components to remove from the canvas.
        Specified by:
        getComponentsPresent in class MapControls
        Returns:
        A list of Components to remove from the canvas.