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 |
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 areapY
- Y coordinate of the upper left corner of the statistics
information areapW
- width of the statistics information areapH
- height of the statistics information area
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 informationpStat
- 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 informationpStatValue
- 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 informationpStatValue
- 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