rails.ui.swing.hexmap
Class GUITile
java.lang.Object
rails.ui.swing.hexmap.GUITile
public class GUITile
- extends java.lang.Object
This class represents the GUI version of a tile.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tileId
protected int tileId
tile
protected TileI tile
tileType
protected java.lang.String tileType
picId
protected int picId
tileImage
protected java.awt.image.BufferedImage tileImage
rotation
protected int rotation
tileScale
protected double tileScale
baseRotation
protected double baseRotation
hex
protected MapHex hex
guiHex
protected GUIHex guiHex
imageLoader
protected static ImageLoader imageLoader
af
protected java.awt.geom.AffineTransform af
DEG60
public static final double DEG60
- See Also:
- Constant Field Values
SVG_X_CENTER_LOC
public static final double SVG_X_CENTER_LOC
- See Also:
- Constant Field Values
SVG_Y_CENTER_LOC
public static final double SVG_Y_CENTER_LOC
- See Also:
- Constant Field Values
log
protected static org.apache.log4j.Logger log
GUITile
public GUITile(int tileId,
GUIHex guiHex)
setRotation
public void setRotation(int rotation)
rotate
public boolean rotate(int initial,
GUITile previousGUITile,
boolean mustConnect)
- Rotate right (clockwise) until a valid orientation is found.
- Parameters:
initial:
- First rotation to try. Should be 0 for the initial tile
drop, and 1 at subsequent rotation attempts.
- Returns:
- false if no valid rotation exists (i.e. the tile cannot
be laid).
getRotation
public int getRotation()
setScale
public void setScale(double scale)
paintTile
public void paintTile(java.awt.Graphics2D g2,
int x,
int y)
getTile
public TileI getTile()
getTileId
public int getTileId()