org.placelab.demo.mapview
Class ItemBacking

java.lang.Object
  extended byorg.placelab.demo.mapview.ItemBacking
Direct Known Subclasses:
BitmapMapBacking, PlaceBacking

public abstract class ItemBacking
extends java.lang.Object


Field Summary
protected  org.eclipse.swt.graphics.ImageData image
           
protected  java.lang.String imageName
           
protected  WadData loadWad
           
protected  java.lang.String wadRelativeImagePath
           
 
Constructor Summary
ItemBacking(org.eclipse.swt.graphics.ImageData image, java.lang.String imageName)
          This constructor is used if you are creating an ItemBacking without loading it from a wad (that is, you're generating the item or something)
ItemBacking(java.lang.String imageName, java.lang.String wadRelativeImagePath, WadData loadedFromWad)
          Use this constructor when the ItemBacking is being loaded from the wad.
 
Method Summary
protected  void assignDefaultImagePath()
           
 org.eclipse.swt.graphics.ImageData getImageResource()
          Loads the image data from the wad, or simply returns it if it is cached
 java.lang.String getWadRelativeImagePath()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

protected org.eclipse.swt.graphics.ImageData image

imageName

protected java.lang.String imageName

wadRelativeImagePath

protected java.lang.String wadRelativeImagePath

loadWad

protected WadData loadWad
Constructor Detail

ItemBacking

public ItemBacking(org.eclipse.swt.graphics.ImageData image,
                   java.lang.String imageName)
This constructor is used if you are creating an ItemBacking without loading it from a wad (that is, you're generating the item or something)


ItemBacking

public ItemBacking(java.lang.String imageName,
                   java.lang.String wadRelativeImagePath,
                   WadData loadedFromWad)
Use this constructor when the ItemBacking is being loaded from the wad.

Method Detail

assignDefaultImagePath

protected void assignDefaultImagePath()

getWadRelativeImagePath

public java.lang.String getWadRelativeImagePath()

getImageResource

public org.eclipse.swt.graphics.ImageData getImageResource()
Loads the image data from the wad, or simply returns it if it is cached

Returns:
the image data or null if it cannot be found