jfreerails.client.renderer
Class StationRadiusRenderer

java.lang.Object
  extended by jfreerails.client.renderer.StationRadiusRenderer
All Implemented Interfaces:
Painter

public class StationRadiusRenderer
extends java.lang.Object
implements Painter

This class draws the radius of a station on the map.

Author:
Luke

Field Summary
private  java.awt.Color borderColor
          Colour of the highlighted border.
static java.awt.Color COLOR_CANNOT_BUILD
          Border colour to use when placement is not allowed.
static java.awt.Color COLOR_OK
          Border colour to use when placement is OK.
private  ModelRoot modelRoot
           
private  int radius
           
private static int tileSize
           
private  int x
           
private  int y
           
 
Constructor Summary
StationRadiusRenderer(ModelRoot mr)
           
 
Method Summary
 void hide()
           
 void paint(java.awt.Graphics2D g)
           
 void setBorderColor(java.awt.Color c)
           
 void setPosition(int x, int y)
           
 void setRadius(int radius)
           
 void show()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLOR_OK

public static final java.awt.Color COLOR_OK
Border colour to use when placement is OK.


COLOR_CANNOT_BUILD

public static final java.awt.Color COLOR_CANNOT_BUILD
Border colour to use when placement is not allowed.


borderColor

private java.awt.Color borderColor
Colour of the highlighted border.


tileSize

private static final int tileSize
See Also:
Constant Field Values

radius

private int radius

x

private int x

y

private int y

modelRoot

private final ModelRoot modelRoot
Constructor Detail

StationRadiusRenderer

public StationRadiusRenderer(ModelRoot mr)
Method Detail

setBorderColor

public void setBorderColor(java.awt.Color c)

setPosition

public void setPosition(int x,
                        int y)

setRadius

public void setRadius(int radius)

show

public void show()

hide

public void hide()

paint

public void paint(java.awt.Graphics2D g)
Specified by:
paint in interface Painter