de.jreality.ui.viewerapp.actions.view
Class SwitchBackgroundColor

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by de.jreality.ui.viewerapp.actions.AbstractJrAction
          extended by de.jreality.ui.viewerapp.actions.view.SwitchBackgroundColor
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class SwitchBackgroundColor
extends AbstractJrAction

Switches the background color of a scene graph's root, which is used as the background color of the displaying viewer.

Author:
msommer
See Also:
Serialized Form

Field Summary
static Color[] defaultColor
          Deprecated. use ViewerApp.defaultBackgroundColor instead
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
SwitchBackgroundColor(String name, SceneGraphComponent sceneRoot, Color... colors)
          Sets the scene root's background color.
SwitchBackgroundColor(String name, ViewerApp viewerApp, Color... colors)
           
SwitchBackgroundColor(String name, Viewer viewer, Color... colors)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 
Methods inherited from class de.jreality.ui.viewerapp.actions.AbstractJrAction
createMenuItem, createToolboxItem, getIcon, setAcceleratorKey, setIcon, setName, setShortDescription
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultColor

public static Color[] defaultColor
Deprecated. use ViewerApp.defaultBackgroundColor instead
Constructor Detail

SwitchBackgroundColor

public SwitchBackgroundColor(String name,
                             SceneGraphComponent sceneRoot,
                             Color... colors)
Sets the scene root's background color.

Parameters:
name - name of the action
sceneRoot - the root of the scene graph
colors - list of colors with length = 1 or 4

SwitchBackgroundColor

public SwitchBackgroundColor(String name,
                             ViewerApp viewerApp,
                             Color... colors)
See Also:
SwitchBackgroundColor(String, SceneGraphComponent, Color[])

SwitchBackgroundColor

public SwitchBackgroundColor(String name,
                             Viewer viewer,
                             Color... colors)
See Also:
SwitchBackgroundColor(String, SceneGraphComponent, Color[])
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener
Specified by:
actionPerformed in class AbstractJrAction