games.strategy.triplea.ui
Class UIContext

java.lang.Object
  extended by games.strategy.triplea.ui.UIContext

public class UIContext
extends java.lang.Object

A place to find images and map data for a ui.

Author:
sgb

Constructor Summary
UIContext()
           
 
Method Summary
 void addActive(Active actor)
          Add a latch that will be released when the game shuts down.
 void addShutdownLatch(java.util.concurrent.CountDownLatch latch)
          Add a latch that will be released when the game shuts down.
 void addShutdownWindow(java.awt.Window window)
          Add a latch that will be released when the game shuts down.
static int getAIPauseDuration()
           
 DiceImageFactory getDiceImageFactory()
           
 FlagIconImageFactory getFlagImageFactory()
           
 boolean getLockMap()
           
 MapData getMapData()
           
 java.lang.String getMapDir()
           
 MapImage getMapImage()
           
 java.util.Set<IGamePlayer> getPlayerList()
           
 PUImageFactory getPUImageFactory()
           
 double getScale()
           
 boolean getShowBattlesBetweenAIs()
           
 boolean getShowMapOnly()
           
 boolean getShowUnits()
           
static java.util.Map<java.lang.String,java.lang.String> getSkins(GameData data)
          returns the map skins for the game data.
 TileImageFactory getTileImageFactory()
           
 UnitImageFactory getUnitImageFactory()
           
 boolean isShutDown()
           
 void removeACtive(Active actor)
           
 void removeShutdownLatch(java.util.concurrent.CountDownLatch latch)
           
 void removeShutdownWindow(java.awt.Window window)
           
static void setAIPauseDuration(int value)
           
 void setDefaltMapDir(GameData data)
           
 void setLockMap(boolean aBool)
           
 void setMapDir(GameData data, java.lang.String mapDir)
           
 void setPlayerList(java.util.Set<IGamePlayer> value)
           
 void setScale(double scale)
           
 void setShowBattlesBetweenAIs(boolean aBool)
           
 void setShowMapOnly(boolean aBool)
           
 void setShowUnits(boolean aBool)
           
 void setUnitScaleFactor(double scaleFactor)
           
 void shutDown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIContext

public UIContext()
Method Detail

getAIPauseDuration

public static int getAIPauseDuration()

setAIPauseDuration

public static void setAIPauseDuration(int value)

getScale

public double getScale()

setScale

public void setScale(double scale)

setDefaltMapDir

public void setDefaltMapDir(GameData data)

setMapDir

public void setMapDir(GameData data,
                      java.lang.String mapDir)

getMapData

public MapData getMapData()

getMapDir

public java.lang.String getMapDir()

getTileImageFactory

public TileImageFactory getTileImageFactory()

getUnitImageFactory

public UnitImageFactory getUnitImageFactory()

getMapImage

public MapImage getMapImage()

getFlagImageFactory

public FlagIconImageFactory getFlagImageFactory()

getPUImageFactory

public PUImageFactory getPUImageFactory()

getDiceImageFactory

public DiceImageFactory getDiceImageFactory()

addShutdownLatch

public void addShutdownLatch(java.util.concurrent.CountDownLatch latch)
Add a latch that will be released when the game shuts down.


removeACtive

public void removeACtive(Active actor)

addActive

public void addActive(Active actor)
Add a latch that will be released when the game shuts down.


removeShutdownLatch

public void removeShutdownLatch(java.util.concurrent.CountDownLatch latch)

addShutdownWindow

public void addShutdownWindow(java.awt.Window window)
Add a latch that will be released when the game shuts down.


removeShutdownWindow

public void removeShutdownWindow(java.awt.Window window)

isShutDown

public boolean isShutDown()

shutDown

public void shutDown()

getSkins

public static java.util.Map<java.lang.String,java.lang.String> getSkins(GameData data)
returns the map skins for the game data. returns is a map of display-name -> map directory


getShowUnits

public boolean getShowUnits()

setShowUnits

public void setShowUnits(boolean aBool)

getShowMapOnly

public boolean getShowMapOnly()

setShowMapOnly

public void setShowMapOnly(boolean aBool)

getLockMap

public boolean getLockMap()

setLockMap

public void setLockMap(boolean aBool)

getShowBattlesBetweenAIs

public boolean getShowBattlesBetweenAIs()

setShowBattlesBetweenAIs

public void setShowBattlesBetweenAIs(boolean aBool)

getPlayerList

public java.util.Set<IGamePlayer> getPlayerList()

setPlayerList

public void setPlayerList(java.util.Set<IGamePlayer> value)

setUnitScaleFactor

public void setUnitScaleFactor(double scaleFactor)