jfreerails.client.view
Class DetailMapRenderer

java.lang.Object
  extended by jfreerails.client.view.DetailMapRenderer
All Implemented Interfaces:
MapLayerRenderer, MapRenderer

public class DetailMapRenderer
extends java.lang.Object
implements MapRenderer

Draws the main map, that is the terrain, track, trains, station names etc.

Author:
Luke

Field Summary
private  MapLayerRenderer background
           
private  BuildTrackController buildTrackController
           
private  BuildTrackRenderer buildTrackRenderer
           
private  java.awt.Dimension mapSizeInPixels
           
private static boolean OSXWorkaround
           
private  Painter stationBoxes
           
private  StationRadiusRenderer stationRadius
           
private  OverHeadTrainView trainsview
           
 
Constructor Summary
DetailMapRenderer(ReadOnlyWorld world, RenderersRoot rr, ModelRoot modelRoot)
           
 
Method Summary
 BuildTrackController getBuildTrackController()
           
 java.awt.Dimension getMapSizeInPixels()
           
 float getScale()
           
 StationRadiusRenderer getStationRadius()
           
 void paintRect(java.awt.Graphics g, java.awt.Rectangle visibleRect)
           
 void paintTile(java.awt.Graphics g, int tileX, int tileY)
           
 void refreshAll()
           
 void refreshTile(int x, int y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OSXWorkaround

private static final boolean OSXWorkaround

background

private final MapLayerRenderer background

mapSizeInPixels

private final java.awt.Dimension mapSizeInPixels

trainsview

private final OverHeadTrainView trainsview

stationRadius

private final StationRadiusRenderer stationRadius

buildTrackRenderer

private final BuildTrackRenderer buildTrackRenderer

buildTrackController

private final BuildTrackController buildTrackController

stationBoxes

private final Painter stationBoxes
Constructor Detail

DetailMapRenderer

public DetailMapRenderer(ReadOnlyWorld world,
                         RenderersRoot rr,
                         ModelRoot modelRoot)
Method Detail

getStationRadius

public StationRadiusRenderer getStationRadius()

getBuildTrackController

public BuildTrackController getBuildTrackController()

getScale

public float getScale()
Specified by:
getScale in interface MapRenderer

getMapSizeInPixels

public java.awt.Dimension getMapSizeInPixels()
Specified by:
getMapSizeInPixels in interface MapRenderer

paintTile

public void paintTile(java.awt.Graphics g,
                      int tileX,
                      int tileY)
Specified by:
paintTile in interface MapLayerRenderer

refreshTile

public void refreshTile(int x,
                        int y)
Specified by:
refreshTile in interface MapLayerRenderer

paintRect

public void paintRect(java.awt.Graphics g,
                      java.awt.Rectangle visibleRect)
Specified by:
paintRect in interface MapLayerRenderer

refreshAll

public void refreshAll()
Specified by:
refreshAll in interface MapLayerRenderer