org.apache.batik.bridge
Class RepaintRateManager

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.apache.batik.bridge.RepaintRateManager
All Implemented Interfaces:
java.lang.Runnable

public class RepaintRateManager
extends java.lang.Thread

This class is responsible of deciding whether or not a repaint is needed.


Field Summary
protected  long targetFrameTime
          The expected time in ms between two repaints.
protected  UpdateManager updateManager
          The associated UpdateManager.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
RepaintRateManager(UpdateManager um)
          Creates a new repaint manager.
 
Method Summary
 void run()
          The main method of this thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

updateManager

protected UpdateManager updateManager
The associated UpdateManager.

targetFrameTime

protected long targetFrameTime
The expected time in ms between two repaints.
Constructor Detail

RepaintRateManager

public RepaintRateManager(UpdateManager um)
Creates a new repaint manager.
Method Detail

run

public void run()
The main method of this thread. This needs to have a target frame rate, and it needs to ensure that it changes it target frame rate to ensure that it sleeps for at least a few 10s of millisecs per loop (it should also see if it can increase framerate because it's made the last few frames with the current frame-rate easily)
Overrides:
run in class java.lang.Thread


Copyright © 2002 Apache Software Foundation. All Rights Reserved.