com.tensegrity.graphics.render
Class RendererConfigurationUtil

java.lang.Object
  extended bycom.tensegrity.graphics.render.RendererConfigurationUtil

public final class RendererConfigurationUtil
extends java.lang.Object

This class contains simple utility method for obtaining a memento object of type AttributeSet from an object of type RendererConfiguration and for applying such memento objects back to existing RendererConfiguration objects.

Version:
$Id: RendererConfigurationUtil.java,v 1.6 2004/10/05 10:47:14 BurkhardWick Exp $
Author:
StepanRutz
See Also:
RendererConfiguration, AttributeSet

Method Summary
static boolean contains(AttributeSet rcfg, java.lang.String name)
          Checks if the given setting is included in the current configuration
static boolean contains(RendererConfiguration rcfg, java.lang.String name)
          Checks if the given setting is included in the current configuration
static boolean getBoolean(AttributeSet rcfg, java.lang.String name)
          Retrieves the value of a boolean(!)
static boolean getBoolean(RendererConfiguration rcfg, java.lang.String name)
          Retrieves the value of a boolean(!)
static double getDouble(AttributeSet rcfg, java.lang.String name)
          Retrieves the value of a boolean(!)
static double getDouble(RendererConfiguration rcfg, java.lang.String name)
          Retrieves the value of a boolean(!)
static void rendererApplyMemento2Renderer(AttributeSet attributeset, RendererConfiguration configuration)
          This method applies the settings stored in the given AttributeSet to the given RendererConfiguration.
static AttributeSet rendererGetMemento(RendererConfiguration configuration)
          This method read the settings stored in the given RendererConfiguration and returns a memento-like AttributeSet with copied values.
static void setBoolean(AttributeSet rcfg, java.lang.String name, boolean value)
          Sets the boolean value of a rendering hint in the RendererConfiguration
static void setBoolean(RendererConfiguration rcfg, java.lang.String name, boolean value)
          Sets the boolean value of a rendering hint in the RendererConfiguration
static void setDouble(AttributeSet rcfg, java.lang.String name, double value)
          Sets the double value of a rendering hint in the RendererConfiguration
static void setDouble(RendererConfiguration rcfg, java.lang.String name, double value)
          Sets the double value of a rendering hint in the RendererConfiguration
static void setValue(AttributeSet rcfg, java.lang.String name, java.lang.Object value)
          Sets the value of a rendering hint in the RendererConfiguration
static void setValue(RendererConfiguration rcfg, java.lang.String name, java.lang.Object value)
          Sets the value of a rendering hint in the RendererConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

rendererApplyMemento2Renderer

public static final void rendererApplyMemento2Renderer(AttributeSet attributeset,
                                                       RendererConfiguration configuration)
This method applies the settings stored in the given AttributeSet to the given RendererConfiguration.

Parameters:
attributeset - the AttributeSet supplying the values to set.
configuration - the RendererConfiguration to set.

rendererGetMemento

public static AttributeSet rendererGetMemento(RendererConfiguration configuration)
This method read the settings stored in the given RendererConfiguration and returns a memento-like AttributeSet with copied values.

Parameters:
configuration - the RendererConfiguration to convert into a memento AttributeSet
Returns:
the generated memento-like AttributeSet that holds the settings copied from the RendererConfiguration.

setBoolean

public static void setBoolean(RendererConfiguration rcfg,
                              java.lang.String name,
                              boolean value)
Sets the boolean value of a rendering hint in the RendererConfiguration

Parameters:
rcfg - The renderer configuration to change
name - The name of the hint to set
value - The new value of the hint

setBoolean

public static void setBoolean(AttributeSet rcfg,
                              java.lang.String name,
                              boolean value)
Sets the boolean value of a rendering hint in the RendererConfiguration

Parameters:
rcfg - The renderer configuration to change
name - The name of the hint to set
value - The new value of the hint

setDouble

public static void setDouble(RendererConfiguration rcfg,
                             java.lang.String name,
                             double value)
Sets the double value of a rendering hint in the RendererConfiguration

Parameters:
rcfg - The renderer configuration to change
name - The name of the hint to set
value - The new value of the hint

setDouble

public static void setDouble(AttributeSet rcfg,
                             java.lang.String name,
                             double value)
Sets the double value of a rendering hint in the RendererConfiguration

Parameters:
rcfg - The renderer configuration to change
name - The name of the hint to set
value - The new value of the hint

setValue

public static void setValue(RendererConfiguration rcfg,
                            java.lang.String name,
                            java.lang.Object value)
Sets the value of a rendering hint in the RendererConfiguration

Parameters:
rcfg - The renderer configuration to change
name - The name of the hint to set
value - The new value of the hint

setValue

public static void setValue(AttributeSet rcfg,
                            java.lang.String name,
                            java.lang.Object value)
Sets the value of a rendering hint in the RendererConfiguration

Parameters:
rcfg - The renderer configuration to change
name - The name of the hint to set
value - The new value of the hint

getBoolean

public static boolean getBoolean(RendererConfiguration rcfg,
                                 java.lang.String name)
Retrieves the value of a boolean(!) rendering hint in the RendererConfiguration

Parameters:
rcfg - The renderer configuration to change
name - The name of the hint to set
Returns:
The current setting of the renderer hint

getBoolean

public static boolean getBoolean(AttributeSet rcfg,
                                 java.lang.String name)
Retrieves the value of a boolean(!)rendering hint in the RendererConfiguration

Parameters:
rcfg - The renderer configuration to change
name - The name of the hint to set
Returns:
The current setting of the renderer hint

getDouble

public static double getDouble(RendererConfiguration rcfg,
                               java.lang.String name)
Retrieves the value of a boolean(!) rendering hint in the RendererConfiguration

Parameters:
rcfg - The renderer configuration to change
name - The name of the hint to set
Returns:
The current setting of the renderer hint

getDouble

public static double getDouble(AttributeSet rcfg,
                               java.lang.String name)
Retrieves the value of a boolean(!)rendering hint in the RendererConfiguration

Parameters:
rcfg - The renderer configuration to change
name - The name of the hint to set
Returns:
The current setting of the renderer hint

contains

public static boolean contains(RendererConfiguration rcfg,
                               java.lang.String name)
Checks if the given setting is included in the current configuration

Parameters:
rcfg - The renderer configuration to change
name - The name of the hint to set
Returns:
True, if the current configuration contains this setting

contains

public static boolean contains(AttributeSet rcfg,
                               java.lang.String name)
Checks if the given setting is included in the current configuration

Parameters:
rcfg - The renderer configuration to change
name - The name of the hint to set
Returns:
True, if the current configuration contains this setting


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.