rl.leviathan.client.ui
Class CapitalShipSprite

java.lang.Object
  extended by rl.client.ui.Sprite
      extended by rl.client.ui.HexGameElementSprite
          extended by rl.leviathan.client.ui.CapitalShipSprite
All Implemented Interfaces:
java.awt.image.ImageObserver

public class CapitalShipSprite
extends HexGameElementSprite


Field Summary
 
Fields inherited from class rl.client.ui.Sprite
m_Image, m_ParentComponent, m_Visible, TRANSPARENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CapitalShipSprite(javax.swing.JComponent parent, CapitalShip ship, CapitalShipLocation location, Theme theme, HexGrid hexGrid, Affiliation aff, boolean transporting)
           
 
Method Summary
protected  void calculateBoundaries(HexLocation csl)
           
protected  java.awt.Image drawContent(java.awt.Graphics2D graph, java.awt.Image tempImage, java.awt.Rectangle bounds)
           
 java.awt.Rectangle getBounds()
          Returns our bounding rectangle.
 CapitalShipLocation getLocation()
           
 void redraw()
           
 void updateStatus(int turn)
          Call this when the Capital Ship status has changed
 
Methods inherited from class rl.client.ui.HexGameElementSprite
getAffiliationBackgroundColour, getAffiliationColour, getHexBounds, setLocation
 
Methods inherited from class rl.client.ui.Sprite
createImage, createImage, draw, draw, imageUpdate, isReady, isVisible, prepare, repaint, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CapitalShipSprite

public CapitalShipSprite(javax.swing.JComponent parent,
                         CapitalShip ship,
                         CapitalShipLocation location,
                         Theme theme,
                         HexGrid hexGrid,
                         Affiliation aff,
                         boolean transporting)
Method Detail

drawContent

protected java.awt.Image drawContent(java.awt.Graphics2D graph,
                                     java.awt.Image tempImage,
                                     java.awt.Rectangle bounds)
Overrides:
drawContent in class HexGameElementSprite

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.

Overrides:
getBounds in class HexGameElementSprite

redraw

public void redraw()

calculateBoundaries

protected void calculateBoundaries(HexLocation csl)
Overrides:
calculateBoundaries in class HexGameElementSprite

getLocation

public CapitalShipLocation getLocation()
Overrides:
getLocation in class HexGameElementSprite

updateStatus

public void updateStatus(int turn)
Call this when the Capital Ship status has changed

Overrides:
updateStatus in class HexGameElementSprite