net.sf.freecol.client.gui
Class GUI

java.lang.Object
  extended by net.sf.freecol.client.gui.GUI

public final class GUI
extends java.lang.Object

This class is responsible for drawing the map/background on the Canvas. In addition, the graphical state of the map (focus, active unit..) is also a responsibility of this class.


Field Summary
static int ALARM_OFFSET_X
           
static int ALARM_OFFSET_Y
           
 boolean debugShowMission
           
 boolean debugShowMissionInfo
           
 boolean displayColonyValue
           
 Player displayColonyValuePlayer
           
 boolean displayCoordinates
           
static int FOREST_INDEX
           
static int MAX_OTHER_UNITS
           
static int MESSAGE_AGE
           
static int MESSAGE_COUNT
           
static int MISSION_OFFSET_X
           
static int MISSION_OFFSET_Y
           
static int OTHER_UNITS_OFFSET_X
           
static int OTHER_UNITS_OFFSET_Y
           
static int OTHER_UNITS_WIDTH
           
static int OVERLAY_INDEX
           
static int RUMOUR_OFFSET_X
           
static int RUMOUR_OFFSET_Y
           
static int STATE_OFFSET_X
           
static int STATE_OFFSET_Y
           
static int TEXT_OFFSET_X
           
static int TEXT_OFFSET_Y
           
static int UNIT_OFFSET
           
 
Constructor Summary
GUI(FreeColClient freeColClient, java.awt.Dimension size, ImageLibrary lib)
          The constructor to use.
 
Method Summary
 void addMessage(GUIMessage message)
          Adds a message to the list of messages that need to be displayed on the GUI.
 Map.Position convertToMapCoordinates(int x, int y)
          Converts the given screen coordinates to Map coordinates.
 java.awt.image.BufferedImage createStringImage(java.awt.Graphics2D g, java.lang.String nameString, java.awt.Color color, int maxWidth, int preferredFontSize)
          Creates an image with a string of a given color and with a black border around the glyphs.
 java.awt.image.BufferedImage createStringImage(javax.swing.JComponent c, java.lang.String nameString, java.awt.Color color, int maxWidth, int preferredFontSize)
          Creates an image with a string of a given color and with a black border around the glyphs.
 void display(java.awt.Graphics2D g)
          Displays this GUI onto the given Graphics2D.
 void displayColonyTile(java.awt.Graphics2D g, Map map, Tile tile, int x, int y, Colony colony)
          Displays the given Tile onto the given Graphics2D object at the location specified by the coordinates.
 void displayOccupationIndicator(java.awt.Graphics g, Unit unit, int x, int y)
           
 void displayTerrain(java.awt.Graphics2D g, Map map, Tile tile, int x, int y)
          Displays the given Tile onto the given Graphics2D object at the location specified by the coordinates.
 void displayTile(java.awt.Graphics2D g, Map map, Tile tile, int x, int y)
          Displays the given Tile onto the given Graphics2D object at the location specified by the coordinates.
 void displayTile(java.awt.Graphics2D g, Map map, Tile tile, int x, int y, boolean drawUnexploredBorders)
          Displays the given Tile onto the given Graphics2D object at the location specified by the coordinates.
 void drawRoad(java.awt.Graphics2D g, long seed, int x1, int y1, int x2, int y2)
          Draws a road, between the given points, on the provided Graphics.
 void executeWithUnitOutForAnimation(Unit unit, Tile sourceTile, OutForAnimationCallback r)
          Run some code with the given unit made invisible.
 void forceReposition()
          Force the next screen repaint to reposition the tiles on the window.
 Unit getActiveUnit()
          Gets the active unit.
 int getBreakingPoint(java.lang.String string)
          Breaks a line between two words.
 TerrainCursor getCursor()
           
 Map.Position getFocus()
          Gets the focus of the map.
 PathNode getGotoPath()
          Gets the path to be drawn on the map.
 int getHeight()
          Returns the height of this GUI.
 float getMapScale()
          Get the current scale of the map.
 GUIMessage getMessage(int index)
          Gets the message at position 'index'.
 int getMessageCount()
          Gets the amount of message that are currently being displayed on this GUI.
 Map.Position getSelectedTile()
          Gets the selected tile.
 java.awt.Rectangle getTileBounds(int x, int y)
          Calculate the bounds of the rectangle containing a Tile on the screen, and return it.
 java.awt.Rectangle getTileBounds(Tile tile)
          Calculate the bounds of the rectangle containing a Tile on the screen, and return it.
 int getTileHeight()
           
 java.awt.Point getTilePosition(Tile t)
          Gets the position of the given Tile on the drawn map.
 int getTileWidth()
           
 Unit getUnitInFront(Tile unitTile)
          Gets the unit that should be displayed on the given tile.
 java.awt.Point getUnitLabelPositionInTile(javax.swing.JLabel unitLabel, java.awt.Point tileP)
          Gets the position where a unitLabel located at tile should be drawn.
 java.awt.Point getUnitLabelPositionInTile(javax.swing.JLabel unitLabel, Tile tile)
          Gets the position where a unitLabel located at tile should be drawn.
 ViewMode getViewMode()
          Get the View Mode object
 int getWidth()
          Returns the width of this GUI.
 boolean isGotoStarted()
          Checks if there is currently a goto operation on the mapboard.
 boolean isInGame()
          Checks if the game has started.
 boolean isMapNearBottom(int y)
          Returns 'true' if the Tile is near the bottom.
 boolean isMapNearLeft(int x, int y)
          Returns 'true' if the Tile is near the left.
 boolean isMapNearRight(int x, int y)
          Returns 'true' if the Tile is near the right.
 boolean isMapNearTop(int y)
          Returns 'true' if the Tile is near the top.
 void moveTileCursor(Map.Direction direction)
           
 boolean onScreen(int x, int y)
          Checks if the Tile/Units at the given coordinates are displayed on the screen (or, if the map is already displayed and the focus has been changed, whether they will be displayed on the screen the next time it'll be redrawn).
 boolean onScreen(Map.Position position)
          Checks if the Tile/Units at the given coordinates are displayed on the screen (or, if the map is already displayed and the focus has been changed, whether they will be displayed on the screen the next time it'll be redrawn).
 boolean removeOldMessages()
          Removes all the message that are older than MESSAGE_AGE.
 void restartBlinking()
           
 void scaleMap(float delta)
          Change the scale of the map by delta.
 void setActiveUnit(Unit activeUnit)
          Sets the active unit.
 void setDisplayTileText(DisplayTileTextAction.DisplayText tileTextType)
          Set the type of text drawn in the tiles.
 void setFocus(int x, int y)
          Sets the focus of the map.
 void setFocus(Map.Position focus)
          Sets the focus of the map.
 void setFocusImmediately(Map.Position focus)
          Sets the focus of the map and repaints the screen immediately.
 void setGotoPath(PathNode gotoPath)
          Sets the path to be drawn on the map.
 void setInGame(boolean inGame)
          Notifies this GUI that the game has started or ended.
 void setSelectedTile(Map.Position selectedTile)
          Selects the tile at the specified position, without clearing the orders of the first unit contained.
 void setSelectedTile(Map.Position selectedTile, boolean clearGoToOrders)
          Selects the tile at the specified position.
 void setSize(java.awt.Dimension size)
           
 void showColonyPanel(Map.Position selectedTile)
           
 void startCursorBlinking()
          Starts the unit-selection-cursor blinking animation.
 void startGoto()
          Starts a goto operation on the mapboard.
 void stopBlinking()
           
 void stopGoto()
          Stops any ongoing goto operation on the mapboard.
 void updateGotoPathForActiveUnit()
          Sets the path of the active unit to display it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIT_OFFSET

public static final int UNIT_OFFSET
See Also:
Constant Field Values

TEXT_OFFSET_X

public static final int TEXT_OFFSET_X
See Also:
Constant Field Values

TEXT_OFFSET_Y

public static final int TEXT_OFFSET_Y
See Also:
Constant Field Values

STATE_OFFSET_X

public static final int STATE_OFFSET_X
See Also:
Constant Field Values

STATE_OFFSET_Y

public static final int STATE_OFFSET_Y
See Also:
Constant Field Values

ALARM_OFFSET_X

public static final int ALARM_OFFSET_X
See Also:
Constant Field Values

ALARM_OFFSET_Y

public static final int ALARM_OFFSET_Y
See Also:
Constant Field Values

RUMOUR_OFFSET_X

public static final int RUMOUR_OFFSET_X
See Also:
Constant Field Values

RUMOUR_OFFSET_Y

public static final int RUMOUR_OFFSET_Y
See Also:
Constant Field Values

MISSION_OFFSET_X

public static final int MISSION_OFFSET_X
See Also:
Constant Field Values

MISSION_OFFSET_Y

public static final int MISSION_OFFSET_Y
See Also:
Constant Field Values

OTHER_UNITS_OFFSET_X

public static final int OTHER_UNITS_OFFSET_X
See Also:
Constant Field Values

OTHER_UNITS_OFFSET_Y

public static final int OTHER_UNITS_OFFSET_Y
See Also:
Constant Field Values

OTHER_UNITS_WIDTH

public static final int OTHER_UNITS_WIDTH
See Also:
Constant Field Values

MAX_OTHER_UNITS

public static final int MAX_OTHER_UNITS
See Also:
Constant Field Values

MESSAGE_COUNT

public static final int MESSAGE_COUNT
See Also:
Constant Field Values

MESSAGE_AGE

public static final int MESSAGE_AGE
See Also:
Constant Field Values

OVERLAY_INDEX

public static final int OVERLAY_INDEX
See Also:
Constant Field Values

FOREST_INDEX

public static final int FOREST_INDEX
See Also:
Constant Field Values

displayCoordinates

public boolean displayCoordinates

displayColonyValue

public boolean displayColonyValue

displayColonyValuePlayer

public Player displayColonyValuePlayer

debugShowMission

public boolean debugShowMission

debugShowMissionInfo

public boolean debugShowMissionInfo
Constructor Detail

GUI

public GUI(FreeColClient freeColClient,
           java.awt.Dimension size,
           ImageLibrary lib)
The constructor to use.

Parameters:
freeColClient - The main control class.
size - The size of the GUI (= the entire screen if the app is displayed in full-screen).
lib - The library of images needed to display certain things visually.
Method Detail

executeWithUnitOutForAnimation

public void executeWithUnitOutForAnimation(Unit unit,
                                           Tile sourceTile,
                                           OutForAnimationCallback r)
Run some code with the given unit made invisible. You can nest several of these method calls in order to hide multiple units. There are no problems related to nested calls with the same unit.

Parameters:
unit - The unit to be hidden.
r - The code to be executed.

getViewMode

public ViewMode getViewMode()
Get the View Mode object

Returns:
the current view mode.

startCursorBlinking

public void startCursorBlinking()
Starts the unit-selection-cursor blinking animation.


getCursor

public TerrainCursor getCursor()

setSize

public void setSize(java.awt.Dimension size)

moveTileCursor

public void moveTileCursor(Map.Direction direction)

setSelectedTile

public void setSelectedTile(Map.Position selectedTile)
Selects the tile at the specified position, without clearing the orders of the first unit contained.

Parameters:
selectedTile - The Position of the tile to be selected.
See Also:
setSelectedTile(Map.Position, boolean)

setSelectedTile

public void setSelectedTile(Map.Position selectedTile,
                            boolean clearGoToOrders)
Selects the tile at the specified position. There are three possible cases:
  1. If there is a Colony on the Tile the Canvas.showColonyPanel(net.sf.freecol.common.model.Colony) will be invoked.
  2. If the tile contains a unit that can become active, then that unit will be set as the active unit, and clear their goto orders if clearGoToOrders is true
  3. If the two conditions above do not match, then the selectedTile will become the map focus.
If a unit is active and is located on the selected tile, then nothing (except perhaps a map reposition) will happen.

Parameters:
selectedTile - The Position of the tile to be selected.
clearGoToOrders - Use true to clear goto orders of the unit which is activated.
See Also:
getSelectedTile(), setActiveUnit(net.sf.freecol.common.model.Unit), setFocus(Map.Position)

showColonyPanel

public void showColonyPanel(Map.Position selectedTile)

restartBlinking

public void restartBlinking()

stopBlinking

public void stopBlinking()

getUnitInFront

public Unit getUnitInFront(Tile unitTile)
Gets the unit that should be displayed on the given tile.

Parameters:
unitTile - The Tile.
Returns:
The Unit or null if no unit applies.

getSelectedTile

public Map.Position getSelectedTile()
Gets the selected tile.

Returns:
The Position of that tile.
See Also:
setSelectedTile(Map.Position)

getActiveUnit

public Unit getActiveUnit()
Gets the active unit.

Returns:
The Unit.
See Also:
setActiveUnit(net.sf.freecol.common.model.Unit)

setActiveUnit

public void setActiveUnit(Unit activeUnit)
Sets the active unit. Invokes setSelectedTile(Map.Position) if the selected tile is another tile than where the activeUnit is located.

Parameters:
activeUnit - The new active unit.
See Also:
setSelectedTile(Map.Position)

getFocus

public Map.Position getFocus()
Gets the focus of the map. That is the center tile of the displayed map.

Returns:
The Position of the center tile of the displayed map
See Also:
setFocus(Map.Position)

setFocus

public void setFocus(Map.Position focus)
Sets the focus of the map.

Parameters:
focus - The Position of the center tile of the displayed map.
See Also:
getFocus()

setFocusImmediately

public void setFocusImmediately(Map.Position focus)
Sets the focus of the map and repaints the screen immediately.

Parameters:
focus - The Position of the center tile of the displayed map.
See Also:
getFocus()

setFocus

public void setFocus(int x,
                     int y)
Sets the focus of the map.

Parameters:
x - The x-coordinate of the center tile of the displayed map.
y - The x-coordinate of the center tile of the displayed map.
See Also:
getFocus()

getMessageCount

public int getMessageCount()
Gets the amount of message that are currently being displayed on this GUI.

Returns:
The amount of message that are currently being displayed on this GUI.

getMessage

public GUIMessage getMessage(int index)
Gets the message at position 'index'. The message at position 0 is the oldest message and is most likely to be removed during the next call of removeOldMessages(). The higher the index of a message, the more recently it was added.

Parameters:
index - The index of the message to return.
Returns:
The message at position 'index'.

addMessage

public void addMessage(GUIMessage message)
Adds a message to the list of messages that need to be displayed on the GUI.

Parameters:
message - The message to add.

removeOldMessages

public boolean removeOldMessages()
Removes all the message that are older than MESSAGE_AGE.

Returns:
'true' if at least one message has been removed, 'false' otherwise. This can be useful to see if it is necessary to refresh the screen.

getWidth

public int getWidth()
Returns the width of this GUI.

Returns:
The width of this GUI.

getHeight

public int getHeight()
Returns the height of this GUI.

Returns:
The height of this GUI.

display

public void display(java.awt.Graphics2D g)
Displays this GUI onto the given Graphics2D.

Parameters:
g - The Graphics2D on which to display this GUI.

createStringImage

public java.awt.image.BufferedImage createStringImage(java.awt.Graphics2D g,
                                                      java.lang.String nameString,
                                                      java.awt.Color color,
                                                      int maxWidth,
                                                      int preferredFontSize)
Creates an image with a string of a given color and with a black border around the glyphs.

Parameters:
g - A Graphics-object for getting a Font.
nameString - The String to make an image of.
color - The Color to use when displaying the nameString.
maxWidth - The maximum width of the image. The size of the Font will be adjusted if the image gets larger than this value.
preferredFontSize - The preferred font size.
Returns:
The image that was created.

createStringImage

public java.awt.image.BufferedImage createStringImage(javax.swing.JComponent c,
                                                      java.lang.String nameString,
                                                      java.awt.Color color,
                                                      int maxWidth,
                                                      int preferredFontSize)
Creates an image with a string of a given color and with a black border around the glyphs.

Parameters:
c - A JComponent-object for getting a Font.
nameString - The String to make an image of.
color - The Color to use when displaying the nameString.
maxWidth - The maximum width of the image. The size of the Font will be adjusted if the image gets larger than this value.
preferredFontSize - The preferred font size.
Returns:
The image that was created.

drawRoad

public void drawRoad(java.awt.Graphics2D g,
                     long seed,
                     int x1,
                     int y1,
                     int x2,
                     int y2)
Draws a road, between the given points, on the provided Graphics. When you provide the same seed you will get the same road.

Parameters:
g - The Graphics to draw the road upon.
seed - The seed of the random generator that is creating the road.
x1 - The x-component of the first coordinate.
y1 - The y-component of the first coordinate.
x2 - The x-component of the second coordinate.
y2 - The y-component of the second coordinate.

displayColonyTile

public void displayColonyTile(java.awt.Graphics2D g,
                              Map map,
                              Tile tile,
                              int x,
                              int y,
                              Colony colony)
Displays the given Tile onto the given Graphics2D object at the location specified by the coordinates. The visualization of the Tile also includes information from the corresponding ColonyTile from the given Colony.

Parameters:
g - The Graphics2D object on which to draw the Tile.
map - The Map.
tile - The Tile to draw.
x - The x-coordinate of the location where to draw the Tile (in pixels).
y - The y-coordinate of the location where to draw the Tile (in pixels).
colony - The Colony to create the visualization of the Tile for. This object is also used to get the ColonyTile for the given Tile.

displayTerrain

public void displayTerrain(java.awt.Graphics2D g,
                           Map map,
                           Tile tile,
                           int x,
                           int y)
Displays the given Tile onto the given Graphics2D object at the location specified by the coordinates. Draws the terrain and improvements. Doesn't draw settlements, lost city rumours, fog of war, optional values neither units.

The same as calling displayTile(g, map, tile, x, y, true);.

Parameters:
g - The Graphics2D object on which to draw the Tile.
map - The map.
tile - The Tile to draw.
x - The x-coordinate of the location where to draw the Tile (in pixels).
y - The y-coordinate of the location where to draw the Tile (in pixels).

displayTile

public void displayTile(java.awt.Graphics2D g,
                        Map map,
                        Tile tile,
                        int x,
                        int y)
Displays the given Tile onto the given Graphics2D object at the location specified by the coordinates. Everything located on the Tile will also be drawn except for units because their image can be larger than a Tile.

The same as calling displayTile(g, map, tile, x, y, true);.

Parameters:
g - The Graphics2D object on which to draw the Tile.
map - The map.
tile - The Tile to draw.
x - The x-coordinate of the location where to draw the Tile (in pixels).
y - The y-coordinate of the location where to draw the Tile (in pixels).

displayTile

public void displayTile(java.awt.Graphics2D g,
                        Map map,
                        Tile tile,
                        int x,
                        int y,
                        boolean drawUnexploredBorders)
Displays the given Tile onto the given Graphics2D object at the location specified by the coordinates. Everything located on the Tile will also be drawn except for units because their image can be larger than a Tile.

Parameters:
g - The Graphics2D object on which to draw the Tile.
map - The map.
tile - The Tile to draw.
x - The x-coordinate of the location where to draw the Tile (in pixels).
y - The y-coordinate of the location where to draw the Tile (in pixels).
drawUnexploredBorders - If true; draws border between explored and unexplored terrain.

stopGoto

public void stopGoto()
Stops any ongoing goto operation on the mapboard.


startGoto

public void startGoto()
Starts a goto operation on the mapboard.


isGotoStarted

public boolean isGotoStarted()
Checks if there is currently a goto operation on the mapboard.

Returns:
true if a goto operation is in progress.

updateGotoPathForActiveUnit

public void updateGotoPathForActiveUnit()
Sets the path of the active unit to display it.


setGotoPath

public void setGotoPath(PathNode gotoPath)
Sets the path to be drawn on the map.

Parameters:
gotoPath - The path that should be drawn on the map or null if no path should be drawn.

getGotoPath

public PathNode getGotoPath()
Gets the path to be drawn on the map.

Returns:
The path that should be drawn on the map or null if no path should be drawn.

setDisplayTileText

public void setDisplayTileText(DisplayTileTextAction.DisplayText tileTextType)
Set the type of text drawn in the tiles.

Parameters:
tileTextType - a DisplayText value

getBreakingPoint

public int getBreakingPoint(java.lang.String string)
Breaks a line between two words. The breaking point is as close to the center as possible.

Parameters:
string - The line for which we should determine a breaking point.
Returns:
The best breaking point or -1 if there are none.

displayOccupationIndicator

public void displayOccupationIndicator(java.awt.Graphics g,
                                       Unit unit,
                                       int x,
                                       int y)

getUnitLabelPositionInTile

public java.awt.Point getUnitLabelPositionInTile(javax.swing.JLabel unitLabel,
                                                 Tile tile)
Gets the position where a unitLabel located at tile should be drawn.

Parameters:
unitLabel - The unit label with the unit's image and occupation indicator drawn.
tile - The tile where the unitLabel will be drawn over
Returns:
The position where to put the label, null if the Tile is offscreen.

getUnitLabelPositionInTile

public java.awt.Point getUnitLabelPositionInTile(javax.swing.JLabel unitLabel,
                                                 java.awt.Point tileP)
Gets the position where a unitLabel located at tile should be drawn.

Parameters:
unitLabel - The unit label with the unit's image and occupation indicator drawn.
tileP - The position of the Tile on the screen.
Returns:
The position where to put the label, null if tileP is null.

setInGame

public void setInGame(boolean inGame)
Notifies this GUI that the game has started or ended.

Parameters:
inGame - Indicates whether or not the game has started.

isInGame

public boolean isInGame()
Checks if the game has started.

Returns:
true if the game has started.
See Also:
setInGame(boolean)

onScreen

public boolean onScreen(int x,
                        int y)
Checks if the Tile/Units at the given coordinates are displayed on the screen (or, if the map is already displayed and the focus has been changed, whether they will be displayed on the screen the next time it'll be redrawn).

Parameters:
x - The x-coordinate of the Tile in question.
y - The y-coordinate of the Tile in question.
Returns:
'true' if the Tile will be drawn on the screen, 'false' otherwise.

onScreen

public boolean onScreen(Map.Position position)
Checks if the Tile/Units at the given coordinates are displayed on the screen (or, if the map is already displayed and the focus has been changed, whether they will be displayed on the screen the next time it'll be redrawn).

Parameters:
position - The position of the Tile in question.
Returns:
true if the Tile will be drawn on the screen, false otherwise.

convertToMapCoordinates

public Map.Position convertToMapCoordinates(int x,
                                            int y)
Converts the given screen coordinates to Map coordinates. It checks to see to which Tile the given pixel 'belongs'.

Parameters:
x - The x-coordinate in pixels.
y - The y-coordinate in pixels.
Returns:
The map coordinates of the Tile that is located at the given position on the screen.

isMapNearTop

public boolean isMapNearTop(int y)
Returns 'true' if the Tile is near the top.

Parameters:
y - The y-coordinate of a Tile.
Returns:
'true' if the Tile is near the top.

isMapNearBottom

public boolean isMapNearBottom(int y)
Returns 'true' if the Tile is near the bottom.

Parameters:
y - The y-coordinate of a Tile.
Returns:
'true' if the Tile is near the bottom.

isMapNearLeft

public boolean isMapNearLeft(int x,
                             int y)
Returns 'true' if the Tile is near the left.

Parameters:
x - The x-coordinate of a Tile.
y - The y-coordinate of a Tile.
Returns:
'true' if the Tile is near the left.

isMapNearRight

public boolean isMapNearRight(int x,
                              int y)
Returns 'true' if the Tile is near the right.

Parameters:
x - The x-coordinate of a Tile.
y - The y-coordinate of a Tile.
Returns:
'true' if the Tile is near the right.

getMapScale

public float getMapScale()
Get the current scale of the map.

Returns:
a float value

scaleMap

public void scaleMap(float delta)
Change the scale of the map by delta.

Parameters:
delta - a float value

getTilePosition

public java.awt.Point getTilePosition(Tile t)
Gets the position of the given Tile on the drawn map.

Parameters:
t - The Tile.
Returns:
The position of the given Tile, or null if the Tile is not drawn on the mapboard.

getTileBounds

public java.awt.Rectangle getTileBounds(Tile tile)
Calculate the bounds of the rectangle containing a Tile on the screen, and return it. If the Tile is not on-screen a maximal rectangle is returned. The bounds includes a one-tile padding area above the Tile, to include the space needed by any units in the Tile.

Parameters:
tile - The tile on the screen.
Returns:
The bounds rectangle

getTileBounds

public java.awt.Rectangle getTileBounds(int x,
                                        int y)
Calculate the bounds of the rectangle containing a Tile on the screen, and return it. If the Tile is not on-screen a maximal rectangle is returned. The bounds includes a one-tile padding area above the Tile, to include the space needed by any units in the Tile.

Parameters:
x - The x-coordinate of the Tile
y - The y-coordinate of the Tile
Returns:
The bounds rectangle

forceReposition

public void forceReposition()
Force the next screen repaint to reposition the tiles on the window.


getTileHeight

public int getTileHeight()

getTileWidth

public int getTileWidth()