Package net.sf.freecol.client.gui.panel
Class CornerMapControls
- java.lang.Object
-
- net.sf.freecol.client.control.FreeColClientHolder
-
- net.sf.freecol.client.gui.panel.MapControls
-
- net.sf.freecol.client.gui.panel.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classCornerMapControls.MiniMapPanel
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JLabelcompassRoseThe compass rose graphic.private ImageLibrarylibThe image library.private static java.util.logging.Loggerloggerprivate CornerMapControls.MiniMapPanelminiMapPanelThe mini map has its own panel.private java.awt.ImageminiMapSkinA skin for the mini map.-
Fields inherited from class net.sf.freecol.client.gui.panel.MapControls
GAP, infoPanel, MINI_MAP_HEIGHT, MINI_MAP_WIDTH, miniMap, miniMapToggleBorders, miniMapToggleFogOfWarButton, miniMapZoomInButton, miniMapZoomOutButton, unitButtons
-
-
Constructor Summary
Constructors Constructor Description CornerMapControls(FreeColClient freeColClient)The basic constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.awt.Component>getComponentsPresent()Prepare and return a list of map controls components to remove from the canvas.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.voidupdateLayoutIfNeeded()Updates the layout with possibly a new skin and/or size.-
Methods inherited from class net.sf.freecol.client.gui.panel.MapControls
canZoomInMapControls, canZoomOutMapControls, initializeUnitButtons, newInstance, repaint, update, zoomIn, zoomOut
-
Methods inherited from class net.sf.freecol.client.control.FreeColClientHolder
askServer, currentPlayerIsMyPlayer, getClientOptions, getConnectController, getFreeColClient, getFreeColServer, getGame, getGUI, getMap, getMyPlayer, getSpecification, igc, pgc
-
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
lib
private final ImageLibrary lib
The image library.
-
compassRose
private final javax.swing.JLabel compassRose
The compass rose graphic.
-
miniMapPanel
private final CornerMapControls.MiniMapPanel miniMapPanel
The mini map has its own panel.
-
miniMapSkin
private java.awt.Image miniMapSkin
A skin for the mini map.
-
-
Constructor Detail
-
CornerMapControls
public CornerMapControls(FreeColClient freeColClient)
The basic constructor.- Parameters:
freeColClient- TheFreeColClientfor the game.
-
-
Method Detail
-
updateLayoutIfNeeded
public void updateLayoutIfNeeded()
Updates the layout with possibly a new skin and/or size.- Overrides:
updateLayoutIfNeededin classMapControls
-
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:
getComponentsToAddin classMapControls- Parameters:
newSize- TheDimensionof 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:
getComponentsPresentin classMapControls- Returns:
- A list of
Components to remove from the canvas.
-
-