infinitewisdom.view
Class ViewConfig

java.lang.Object
  extended by infinitewisdom.view.ViewConfig
Direct Known Subclasses:
ViewConfigDom1

public abstract class ViewConfig
extends java.lang.Object

This is where you register your units in your game. Used when creating new units e.g. mapeditor, maploading. There's only one instance of a ViewConfig is in use in a game. On usage example see the source code of ViewConfigDom1. Trivia: The mapeditor panel UnitPalette gets the unit classes from here.


Field Summary
protected  java.util.HashMap<java.lang.Class<? extends UnitIF>,java.lang.Class<? extends UnitView>> modelViewMap
          key: unit; value: unitView
 
Constructor Summary
ViewConfig()
           
 
Method Summary
 void createViewForNewUnits(GameWorldView gwv, java.util.List<PlayerView> playerviews, java.util.List<UnitView> unitviews)
           
 java.util.HashMap<java.lang.Class<? extends UnitIF>,java.lang.Class<? extends UnitView>> getModelViewMap()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelViewMap

protected java.util.HashMap<java.lang.Class<? extends UnitIF>,java.lang.Class<? extends UnitView>> modelViewMap
key: unit; value: unitView

Constructor Detail

ViewConfig

public ViewConfig()
Method Detail

createViewForNewUnits

public void createViewForNewUnits(GameWorldView gwv,
                                  java.util.List<PlayerView> playerviews,
                                  java.util.List<UnitView> unitviews)

getModelViewMap

public java.util.HashMap<java.lang.Class<? extends UnitIF>,java.lang.Class<? extends UnitView>> getModelViewMap()