jfreerails.client.top
Class QuickRGBTileRendererList

java.lang.Object
  extended by jfreerails.client.top.QuickRGBTileRendererList
All Implemented Interfaces:
TileRendererList

public class QuickRGBTileRendererList
extends java.lang.Object
implements TileRendererList

Simple implementation of TileRendererList, for testing purposes only.

Author:
Luke

Nested Class Summary
(package private)  class QuickRGBTileRendererList.SimpleTileRenderer
           
 
Field Summary
private static java.awt.GraphicsConfiguration defaultConfiguration
           
private  java.awt.Image[] images
           
private  java.util.HashMap<java.lang.Integer,java.lang.Integer> rgb2index
           
private  int[] rgbValues
           
private  QuickRGBTileRendererList.SimpleTileRenderer simpleTileRenderer
           
 
Constructor Summary
QuickRGBTileRendererList(ReadOnlyWorld w)
           
 
Method Summary
static java.awt.Image createImageFor(TerrainType t)
           
 TileRenderer getTileViewWithNumber(int i)
           
 TileRenderer getTileViewWithRGBValue(int rgb)
           
 boolean validate(ReadOnlyWorld world)
          Checks whether this tile view list has tile views for all the terrain types in the specifed list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rgbValues

private final int[] rgbValues

images

private final java.awt.Image[] images

rgb2index

private final java.util.HashMap<java.lang.Integer,java.lang.Integer> rgb2index

simpleTileRenderer

private final QuickRGBTileRendererList.SimpleTileRenderer simpleTileRenderer

defaultConfiguration

private static final java.awt.GraphicsConfiguration defaultConfiguration
Constructor Detail

QuickRGBTileRendererList

public QuickRGBTileRendererList(ReadOnlyWorld w)
Method Detail

createImageFor

public static java.awt.Image createImageFor(TerrainType t)

getTileViewWithNumber

public TileRenderer getTileViewWithNumber(int i)
Specified by:
getTileViewWithNumber in interface TileRendererList

getTileViewWithRGBValue

public TileRenderer getTileViewWithRGBValue(int rgb)

validate

public boolean validate(ReadOnlyWorld world)
Description copied from interface: TileRendererList
Checks whether this tile view list has tile views for all the terrain types in the specifed list.

Specified by:
validate in interface TileRendererList