net.sf.freecol.client.gui.panel
Class ImageProvider

java.lang.Object
  extended by net.sf.freecol.client.gui.panel.ImageProvider

public abstract class ImageProvider
extends java.lang.Object

An object that should be able to provide images upon request.


Constructor Summary
ImageProvider()
           
 
Method Summary
abstract  java.awt.Image getColorChip(java.awt.Color color)
          Should return the Image of the color chip with the given color.
abstract  java.awt.Image getGoodsImage(GoodsType type)
          Should return the Image of the graphic with the given type.
abstract  javax.swing.ImageIcon getGoodsImageIcon(GoodsType type)
          Should return the Image of the graphic with the given type.
abstract  java.awt.Image getMiscImage(java.lang.String type)
          Should return the Image of the graphic with the given type.
abstract  java.awt.Image getTerrainImage(TileType type, int x, int y)
          Should return the Image of the terrain with the given type.
abstract  int getTerrainImageHeight(TileType type)
          Should return the height of the terrain-image at the given index.
abstract  int getTerrainImageWidth(TileType type)
          Should return the width of the terrain-image at the given index.
abstract  javax.swing.ImageIcon getUnitButtonImageIcon(int index, int state)
          Should return the ImageIcon of the Unit Button with the given index.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageProvider

public ImageProvider()
Method Detail

getTerrainImage

public abstract java.awt.Image getTerrainImage(TileType type,
                                               int x,
                                               int y)
Should return the Image of the terrain with the given type.

Parameters:
type - The type of the terrain of which we need the Image.
x - The x-coordinate of the location of the tile that is being drawn.
y - The x-coordinate of the location of the tile that is being drawn.
Returns:
The Image of the terrain with the given type.

getGoodsImage

public abstract java.awt.Image getGoodsImage(GoodsType type)
Should return the Image of the graphic with the given type.

Parameters:
type - The type of the graphic of which we need the Image.
Returns:
The Image of the graphic with the given type.

getGoodsImageIcon

public abstract javax.swing.ImageIcon getGoodsImageIcon(GoodsType type)
Should return the Image of the graphic with the given type.

Parameters:
type - The type of the graphic of which we need the Image.
Returns:
The Image of the graphic with the given type.

getMiscImage

public abstract java.awt.Image getMiscImage(java.lang.String type)
Should return the Image of the graphic with the given type.

Parameters:
type - The type of the graphic of which we need the Image.
Returns:
The Image of the graphic with the given type.

getColorChip

public abstract java.awt.Image getColorChip(java.awt.Color color)
Should return the Image of the color chip with the given color.

Parameters:
color - The color of the color chip of which we need the Image.
Returns:
The Image of the color chip with the given color.

getUnitButtonImageIcon

public abstract javax.swing.ImageIcon getUnitButtonImageIcon(int index,
                                                             int state)
Should return the ImageIcon of the Unit Button with the given index.

Parameters:
index - The index of the image to return.
state - The state (normal, highlighted, pressed, disabled)
Returns:
The image pointer

getTerrainImageWidth

public abstract int getTerrainImageWidth(TileType type)
Should return the width of the terrain-image at the given index.

Parameters:
type - The type of the terrain-image.
Returns:
The width of the terrain-image at the given index.

getTerrainImageHeight

public abstract int getTerrainImageHeight(TileType type)
Should return the height of the terrain-image at the given index.

Parameters:
type - The type of the terrain-image.
Returns:
The height of the terrain-image at the given index.