Modifier and Type | Field and Description |
---|---|
static int |
tileHeight
The height of a tile.
|
static int |
tileWidth
The width of a tile.
|
Constructor and Description |
---|
RCTile(RCView panel,
int row,
int col)
Construct a tile for the given row & column on a panel.
|
Modifier and Type | Method and Description |
---|---|
void |
paint(Graphics g)
Ask this tile to draw it's current image.
|
static int |
pixelX(int col)
Convert a tile column number into an x pixel coordinate.
|
static int |
pixelY(int row)
Convert a tile row number into a y pixel coordinate.
|
void |
repaint() |
void |
setHilite(boolean hilite) |
void |
setImg(Image image)
Tell this tile what image it will draw.
|
static int |
tileCol(int x)
Convert an x pixel coordinate into a tile column number.
|
static int |
tileRow(int y)
Convert a y pixel coordinate into a tile row number.
|
public static final int tileWidth
public static final int tileHeight
public RCTile(RCView panel, int row, int col)
panel
- this tile's parent panelrow
- this tile's rowcol
- this tile's columnpublic static int tileCol(int x)
public static int tileRow(int y)
public static int pixelX(int col)
public static int pixelY(int row)
public void setImg(Image image)
public void setHilite(boolean hilite)
public void repaint()
public void paint(Graphics g)
Copyright © 2007 Gem City Software. Distributed under the terms of the GPL