org.jdesktop.jdic.screensaver
Class ScreensaverContext

java.lang.Object
  extended by org.jdesktop.jdic.screensaver.ScreensaverContext

public class ScreensaverContext
extends java.lang.Object

Context object with information about the screensaver.

Author:
Mark Roth

Constructor Summary
ScreensaverContext()
           
 
Method Summary
 java.awt.Component getComponent()
          Returns the component to be rendered to.
 ScreensaverSettings getSettings()
          Returns the screensaver settings.
 boolean isFullScreen()
          Returns true if the screensaver is in full-screen mode or false if it is in preview mode.
 void loadOptions(java.lang.String screensaverName)
          Loads the screensaver options from the user's home directory.
 void option(java.lang.String key, java.lang.String value)
          Sets an option for this screensaver.
 void setComponent(java.awt.Component component)
          Sets the component to be rendered to.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScreensaverContext

public ScreensaverContext()
Method Detail

getComponent

public java.awt.Component getComponent()
Returns the component to be rendered to.

Returns:
Value of property component.

setComponent

public void setComponent(java.awt.Component component)
Sets the component to be rendered to.

Parameters:
component - New value of property component.

option

public void option(java.lang.String key,
                   java.lang.String value)
Sets an option for this screensaver. This method is called from the native layer for each screen saver option set.

Parameters:
key - The key to set
value - The value to set

loadOptions

public void loadOptions(java.lang.String screensaverName)
Loads the screensaver options from the user's home directory. This method is called from the native layer if the underlying screensaver APIs do not support automatic setting persistence.

Parameters:
screensaverName - The name of the screensaver, to load settings from

getSettings

public ScreensaverSettings getSettings()
Returns the screensaver settings.

Returns:
The current screensaver settings (not a copy).

isFullScreen

public boolean isFullScreen()
Returns true if the screensaver is in full-screen mode or false if it is in preview mode.