netwar.utils
Class FPS

java.lang.Object
  |
  +--netwar.utils.FPS
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class FPS
extends java.lang.Object
implements java.awt.event.ActionListener

Temporary class to display the number of frames per second.

Author:
Kyle Kakligian

Constructor Summary
FPS()
          Constructs FPS.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
static void draw(java.awt.Graphics g)
          Draws the frames per sec in the upper left corner
static void incG()
          To be called only from within a graphics update.
static void incU()
          To be called only from within an Updater update.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FPS

public FPS()
Constructs FPS.
Method Detail

draw

public static void draw(java.awt.Graphics g)
Draws the frames per sec in the upper left corner
Parameters:
g - Graphics object to draw onto.

incG

public static void incG()
To be called only from within a graphics update.

incU

public static void incU()
To be called only from within an Updater update.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener