com.croftsoft.core.animation.animator
Class FrameRateAnimator

java.lang.Object
  extended by com.croftsoft.core.animation.animator.FrameRateAnimator
All Implemented Interfaces:
ComponentAnimator, ComponentPainter, ComponentUpdater

public final class FrameRateAnimator
extends Object
implements ComponentAnimator

Samples and displays the frame rate.

Since:
2003-02-07
Version:
2003-07-07
Author:
David Wallace Croft

Constructor Summary
FrameRateAnimator(Color color, Font font, Rectangle2D textLayoutBounds)
           
FrameRateAnimator(Component component)
           
FrameRateAnimator(Component component, Color color)
           
 
Method Summary
 double getFrameRate()
           
 void paint(JComponent component, Graphics2D graphics)
           
 void toggle()
           
 void update(JComponent component)
          Updates the state of a JComponent and calls repaint() as required.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrameRateAnimator

public FrameRateAnimator(Color color,
                         Font font,
                         Rectangle2D textLayoutBounds)

FrameRateAnimator

public FrameRateAnimator(Component component,
                         Color color)

FrameRateAnimator

public FrameRateAnimator(Component component)
Method Detail

update

public void update(JComponent component)
Description copied from interface: ComponentUpdater
Updates the state of a JComponent and calls repaint() as required.

Specified by:
update in interface ComponentUpdater

paint

public void paint(JComponent component,
                  Graphics2D graphics)
Specified by:
paint in interface ComponentPainter

getFrameRate

public double getFrameRate()

toggle

public void toggle()

CroftSoft Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)