Updated comments for Swing active rendering

This commit is contained in:
nathan 2016-09-05 14:37:07 +02:00
parent 7c8270f5da
commit 4bb80be7b4

View File

@ -4,6 +4,7 @@ import java.awt.Graphics;
import java.awt.Toolkit; import java.awt.Toolkit;
import java.awt.image.BufferStrategy; import java.awt.image.BufferStrategy;
import javax.swing.JComponent;
import javax.swing.JFrame; import javax.swing.JFrame;
import dorkbox.util.ActionHandlerLong; import dorkbox.util.ActionHandlerLong;
@ -19,7 +20,10 @@ class ActiveRenderLoop implements Runnable {
/** /**
* How many frames per second we want the Swing ActiveRender thread to run at * How many frames per second we want the Swing ActiveRender thread to run at
* *
* NOTE: The ActiveRenderLoop replaces the Swing EDT in order to enable smoother animations. * NOTE: The ActiveRenderLoop replaces the Swing EDT (only for specified JFrames) in order to enable smoother animations. It is also
* important to REMEMBER -- if you add a component to an actively managed JFrame, YOU MUST make sure to call
* {@link JComponent#setIgnoreRepaint(boolean)} otherwise this component will "fight" on the EDT for updates. You can completely
* disable the EDT by calling {@link NullRepaintManager#install()}
*/ */
public static int TARGET_FPS = 30; public static int TARGET_FPS = 30;