|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.client.ui.swing.TilesetManager
public class TilesetManager
Handles loading and manipulating images from both the mech tileset and the terrain tileset.
| Field Summary | |
|---|---|
static int |
ARTILLERY_ADJUSTED
|
static int |
ARTILLERY_AUTOHIT
|
static int |
ARTILLERY_INCOMING
|
| Constructor Summary | |
|---|---|
TilesetManager(java.awt.Component comp)
Creates new TilesetManager |
|
| Method Summary | |
|---|---|
java.awt.Image |
baseFor(IHex hex)
Return the base image for the hex |
void |
clearHex(IHex hex)
Removes the hex images from the cache. |
java.awt.Image |
getArtilleryTarget(int which)
|
java.awt.Image |
getEcmShade(int tint)
|
java.awt.Image |
getMinefieldSign()
|
java.awt.Image |
getNightFog()
|
java.awt.Image |
getPlayerCamo(Player player)
Get the camo pattern for the given player. |
java.awt.Image |
iconFor(Entity entity)
|
java.awt.Image |
imageFor(Entity entity)
Return the image for the entity |
java.awt.Image |
imageFor(Entity entity,
int secondaryPos)
|
java.awt.Image |
imageFor(Entity entity,
int facing,
int secondaryPos)
|
boolean |
isLoaded()
|
boolean |
isStarted()
|
void |
loadAllHexes()
Loads all the hex tileset images |
void |
loadImage(Entity entity,
int secondaryPos)
Load a single entity image |
void |
loadNeededImages(IGame game)
Load all the images we'll need for the game and place them in the tracker |
java.awt.Image |
loadPreviewImage(Entity entity,
java.awt.Image camo,
int tint,
java.awt.Component bp)
Loads a preview image of the unit into the BufferedPanel. |
void |
preferenceChange(PreferenceChangeEvent e)
|
void |
reset()
Resets the started and loaded flags |
java.util.List<java.awt.Image> |
supersFor(IHex hex)
Return a list of superimposed images for the hex |
void |
waitForHex(IHex hex)
Waits until a certain hex's images are done loading. |
java.awt.Image |
wreckMarkerFor(Entity entity,
int secondaryPos)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ARTILLERY_AUTOHIT
public static final int ARTILLERY_ADJUSTED
public static final int ARTILLERY_INCOMING
| Constructor Detail |
|---|
public TilesetManager(java.awt.Component comp)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public void preferenceChange(PreferenceChangeEvent e)
preferenceChange in interface IPreferenceChangeListenerpublic java.awt.Image iconFor(Entity entity)
iconFor in interface ITilesetManager
public java.awt.Image wreckMarkerFor(Entity entity,
int secondaryPos)
public java.awt.Image imageFor(Entity entity)
public java.awt.Image imageFor(Entity entity,
int secondaryPos)
public java.awt.Image imageFor(Entity entity,
int facing,
int secondaryPos)
public java.awt.Image baseFor(IHex hex)
public java.util.List<java.awt.Image> supersFor(IHex hex)
public java.awt.Image getMinefieldSign()
public java.awt.Image getNightFog()
public java.awt.Image getEcmShade(int tint)
public java.awt.Image getArtilleryTarget(int which)
public boolean isStarted()
public boolean isLoaded()
public void loadNeededImages(IGame game)
public void clearHex(IHex hex)
hex - public void waitForHex(IHex hex)
hex - the hex to wait forpublic void loadAllHexes()
public java.awt.Image loadPreviewImage(Entity entity,
java.awt.Image camo,
int tint,
java.awt.Component bp)
loadPreviewImage in interface ITilesetManagerpublic java.awt.Image getPlayerCamo(Player player)
getPlayerCamo in interface ITilesetManagerplayer - - the Player whose camo pattern is needed.
Image of the player's camo pattern. This value
will be null if the player has selected no camo
pattern or if there was an error loading it.
public void loadImage(Entity entity,
int secondaryPos)
public void reset()
reset in interface ITilesetManager
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||