Class SimpleScreenSaver

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, JPPFScreenSaver

public class SimpleScreenSaver extends JPanel implements JPPFScreenSaver
A built-in simple screen saver implementation. It draws 500 discs at random locations with a random color 25 times / second. Every 5 seconds, the screen is emptied (repainted in black).
Since:
4.0
Author:
Laurent Cohen
See Also:
  • Constructor Details

    • SimpleScreenSaver

      public SimpleScreenSaver()
      Default constructor.
  • Method Details

    • getComponent

      public JComponent getComponent()
      Description copied from interface: JPPFScreenSaver
      Get the Swing component for this screen saver.
      Specified by:
      getComponent in interface JPPFScreenSaver
      Returns:
      a JComponent.
    • init

      public void init(org.jppf.utils.TypedProperties config, boolean fullscreen)
      Description copied from interface: JPPFScreenSaver
      Initialize this screen saver, and in particular its UI components.
      Specified by:
      init in interface JPPFScreenSaver
      Parameters:
      config - a copy of the JPPF configuration,
      fullscreen - true if the screen saver is to be displayed in full screen mode, false if it is to run in windowed mode.
    • destroy

      public void destroy()
      Description copied from interface: JPPFScreenSaver
      Destroy this screen saver and release its resources.
      Specified by:
      destroy in interface JPPFScreenSaver
    • paintComponent

      public void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent