org.jdesktop.jdic.screensaver.bouncingline
Class BouncingLine

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

public class BouncingLine
extends SimpleScreensaver

Example classic bouncing line screen saver. Good starting point for new screensavers.

Author:
Mark Roth

Constructor Summary
BouncingLine()
           
 
Method Summary
 void init()
          Initialize this screen saver - pick two random points and directions.
 void paint(java.awt.Graphics g)
          Paint the next frame - erase the old line and paint the new line.
 
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

BouncingLine

public BouncingLine()
Method Detail

init

public void init()
Initialize this screen saver - pick two random points and directions.


paint

public void paint(java.awt.Graphics g)
Paint the next frame - erase the old line and paint the new line.

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