org.jdesktop.jdic.screensaver.bouncingline
Class Test2

java.lang.Object
  extended by org.jdesktop.jdic.screensaver.ScreensaverBase
      extended by org.jdesktop.jdic.screensaver.SimpleScreensaver
          extended by org.jdesktop.jdic.screensaver.bouncingline.Test2

public class Test2
extends SimpleScreensaver


Constructor Summary
Test2()
           
 
Method Summary
 void init()
          Subclasses can optionally override this method to perform any initialization.
static void main(java.lang.String[] args)
           
 void paint(java.awt.Graphics g)
          Override this method in your subclasses to paint a single frame.
 
Methods inherited from class org.jdesktop.jdic.screensaver.SimpleScreensaver
renderFrame
 
Methods inherited from class org.jdesktop.jdic.screensaver.ScreensaverBase
baseDestroy, baseInit, getContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Test2

public Test2()
Method Detail

init

public void init()
Description copied from class: ScreensaverBase
Subclasses can optionally override this method to perform any initialization. Default does nothing.

Init will be called once at the beginning, before the first paint, and zero or more times during the running to reset the screensaver (for example if the resolution changed).


paint

public void paint(java.awt.Graphics g)
Description copied from class: SimpleScreensaver
Override this method in your subclasses to paint a single frame. Any exceptions thrown during paint will be sent to the org.jdesktop.jdic.screensaver J2SE logger.

Tip: Treat this as though it were part of a game loop. In general, it's a good idea not to allocate ('new') any objects after init unless they will not be deleted. This will yield smoother animation and no pauses from the garbage collector.

Specified by:
paint in class SimpleScreensaver
Parameters:
g - Graphics context used to draw to the screensaver window.

main

public static void main(java.lang.String[] args)