monrovia.client.ui
Class Stats

java.lang.Object
  |
  +--com.sun.kjava.TextBox
        |
        +--monrovia.client.ui.Stats

public class Stats
extends com.sun.kjava.TextBox

This class handles the player statistics printing.


Fields inherited from class com.sun.kjava.TextBox
g, height, heightM, lineEnds, lineStarts, text, width, widthM, xPos, yPos
 
Constructor Summary
Stats(int pX, int pY, int pW, int pH)
          Constructor for the class.
 
Method Summary
 void printAll(com.sun.kjava.DialogOwner pO)
          Print the statistics in the modal dialog and display it.
 void refresh(boolean pForce)
          Print a brief version of the statistics on the game screen.
 void registerStat(int pStatID, Stat pStat)
          Tell the class that there is a new statistics information which will be printed on the screen when given some value for it.
 void setStat(int pStatID, int pStatValue)
          Update the value of an integer type statistics iformation
 void setStat(int pStatID, java.lang.String pStatValue)
          Update the value of a string type statistics iformation
 
Methods inherited from class com.sun.kjava.TextBox
getNumLines, paint, setBounds, setText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stats

public Stats(int pX,
             int pY,
             int pW,
             int pH)
Constructor for the class. Saves the dimensions of statistics information area.
Parameters:
pX - X coordinate of the upper left corner of the statistics information area
pY - Y coordinate of the upper left corner of the statistics information area
pW - width of the statistics information area
pH - height of the statistics information area
Method Detail

registerStat

public void registerStat(int pStatID,
                         Stat pStat)
Tell the class that there is a new statistics information which will be printed on the screen when given some value for it.
Parameters:
pStatID - ID of the statistics information
pStat - stat object describing the statistics information

setStat

public void setStat(int pStatID,
                    int pStatValue)
Update the value of an integer type statistics iformation
Parameters:
pStatID - ID of the statistics information
pStatValue - int value of the statistics information

setStat

public void setStat(int pStatID,
                    java.lang.String pStatValue)
Update the value of a string type statistics iformation
Parameters:
pStatID - ID of the statistics information
pStatValue - String value of the statistics information

refresh

public void refresh(boolean pForce)
Print a brief version of the statistics on the game screen.

printAll

public void printAll(com.sun.kjava.DialogOwner pO)
Print the statistics in the modal dialog and display it.
Parameters:
pO - the DialogOwner object of this dialog