nankin.zheng.gatem.view
Class BackgroundView

java.lang.Object
  |
  +--nankin.zheng.gatem.view.RoleView
        |
        +--nankin.zheng.gatem.view.BackgroundView

public abstract class BackgroundView
extends RoleView

RoleView object of game background. It accepts additional viewport information and passes it to DisplayCache.

Version:
1.0, Date 2003-04-11
Author:
ZHENG Zhong

Field Summary
 
Fields inherited from class nankin.zheng.gatem.view.RoleView
aImages, displayCache, env, roleName
 
Constructor Summary
BackgroundView(Env environ, DisplayCache dc, java.lang.String rname, AnchoredImage[] aimgs)
          Constructor.
 
Method Summary
 void notifyViewport(Position vp)
          Pass viewport position information to DisplayCache.
 
Methods inherited from class nankin.zheng.gatem.view.RoleView
draw, getCreatedInstanceCount, getRoleName, testInitialization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackgroundView

public BackgroundView(Env environ,
                      DisplayCache dc,
                      java.lang.String rname,
                      AnchoredImage[] aimgs)
               throws GameException
Constructor.

Parameters:
environ - environment.
dc - DisplayCache, which will be used while drawing.
rname - role name.
aimgs - anchored image array.
Throws:
java.lang.NullPointerException - if any parameter is null.
GameException - if any error occured.
Method Detail

notifyViewport

public void notifyViewport(Position vp)
                    throws GameException
Pass viewport position information to DisplayCache. NOTE that this method should be called before any role is drawn.

Parameters:
vp - position of viewport (logical coordonate)
Throws:
java.lang.NullPointerException - if vp is null.
GameException