rl.client.ui
Class HexGameElementSprite
java.lang.Object
rl.client.ui.Sprite
rl.client.ui.HexGameElementSprite
- All Implemented Interfaces:
- java.awt.image.ImageObserver
- Direct Known Subclasses:
- CapitalShipMissileSprite, CapitalShipSprite
public class HexGameElementSprite
- extends Sprite
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HexGameElementSprite
public HexGameElementSprite(javax.swing.JComponent parent,
GameElement element,
HexLocation location,
Theme theme,
HexGrid hexGrid,
Affiliation aff,
boolean transporting)
drawContent
protected java.awt.Image drawContent(java.awt.Graphics2D graph,
java.awt.Image tempImage,
java.awt.Rectangle bounds)
- Specified by:
drawContent in class Sprite
getBounds
public java.awt.Rectangle getBounds()
- Description copied from class:
Sprite
- Returns our bounding rectangle. The coordinates here are stored
with the top left corner of the _board_ being 0, 0, so these do
not always correspond to screen coordinates.
- Specified by:
getBounds in class Sprite
getHexBounds
public java.awt.Rectangle getHexBounds()
setLocation
public void setLocation(HexLocation location,
boolean transporting)
calculateBoundaries
protected void calculateBoundaries(HexLocation location)
getLocation
public HexLocation getLocation()
getAffiliationColour
public java.awt.Color getAffiliationColour()
getAffiliationBackgroundColour
public java.awt.Color getAffiliationBackgroundColour()
updateStatus
public void updateStatus(int turn)
- Call this when the vehicle status has changed