DESY ACOP Beans Home

com.cosylab.gui.components.util
Class ColorHelper

java.lang.Object
  extended by com.cosylab.gui.components.util.ColorHelper

public final class ColorHelper
extends java.lang.Object

Helper class that provides simple access to most often used Color UI resources

Version:
$id$
Author:
Jernej Kamenik
See Also:
MetalLookAndFeel

Field Summary
static java.lang.String[] COLOR_NAMES
           
static java.lang.String[] JAVA_COLOR_NAMES
           
 
Constructor Summary
ColorHelper()
           
 
Method Summary
static java.awt.Color getAlarm()
          Returns the default CosyBeans alarm Color.
static java.awt.Color getAlarmInvalid()
          Returns the default CosyBeans alarm Color.
static java.awt.Color getAlarmInvalidBackground()
          Returns the default CosyBeans alarm Color.
static java.awt.Color getAlarmMajor()
          Returns the default CosyBeans alarm Color.
static java.awt.Color getAlarmMajorBackground()
          Returns the default CosyBeans alarm Color.
static java.awt.Color getAlarmMinor()
          Returns the default CosyBeans alarm Color.
static java.awt.Color getAlarmMinorBackground()
          Returns the default CosyBeans alarm Color.
static java.awt.Color getAlarmOutline()
          Returns the default CosyBeans alarm outline Color.
static java.awt.Color getControl()
          Returns the default control Color, which should be used to render the background of controls used in applications
static java.awt.Color getControlDarkShadow()
          Returns the default control dark shadow Color
static java.awt.Color getControlHighlight()
          Returns the default control highlight Color
static java.awt.Color getControlLightHighlight()
          Returns the default control highlight Color
static java.awt.Color getControlShadow()
          Returns the default control shadow Color
static java.awt.Color getControlText()
          Returns the default control text Color
static java.awt.Color getCosyControl()
          Returns the default CosyBeans control Color
static java.awt.Color getCosyControlDarkShadow()
          Returns the default CosyBeans control dark shadow Color
static java.awt.Color getCosyControlHighlight()
          Returns the default CosyBeans control highlight Color
static java.awt.Color getCosyControlShadow()
          Returns the default CosyBeans control shadow Color
static java.awt.Color getCosyControlText()
          Returns the default CosyBenas control text Color
static java.awt.Color getCosyErrorText()
          Returns the default CosyBeans error text Color
static java.awt.Color getCosyInputBackground()
          Returns the default CosyBeans input background Color
static java.awt.Color getCosyOverlay()
          Returns the default CosyBeans overlay Color
static java.awt.Color getEmergency()
          Returns the default CosyBeans emergency Color.
static java.awt.Color getEmergencyOutline()
          Returns the default CosyBeans emergency outline Color.
static java.awt.Color getError()
          Returns the default Color used to render errors.
static java.awt.Color getFocus()
          Returns the default focus Color
static java.awt.Color getHyperlink()
           
static java.awt.Color getText()
          Returns the default text Color
static java.awt.Color getTextHighlight()
          Returns the default text highlight Color
static java.awt.Color getTextHighlightText()
           
static java.awt.Color getTimeOut()
          Returns the default CosyBeans timeout Color.
static java.awt.Color getTimeOutOutline()
           
static java.awt.Color getWarning()
          Returns the default CosyBeans warning Color.
static java.awt.Color getWarningOutline()
          Returns the default CosyBeans warning outline Color.
static java.awt.Color getWindowBackground()
          Returns the default window background Color
static void setBackgroundForComponents(java.awt.Component[] components, java.awt.Color background)
          Recursively sets the background color to all components.
static void setForegroundForComponents(java.awt.Component[] components, java.awt.Color foreground)
          Recursively sets the foreground color to all components.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLOR_NAMES

public static final java.lang.String[] COLOR_NAMES

JAVA_COLOR_NAMES

public static final java.lang.String[] JAVA_COLOR_NAMES
Constructor Detail

ColorHelper

public ColorHelper()
Method Detail

getControl

public static java.awt.Color getControl()
Returns the default control Color, which should be used to render the background of controls used in applications

Returns:
Control color

getControlShadow

public static java.awt.Color getControlShadow()
Returns the default control shadow Color

Returns:
Color

getControlDarkShadow

public static java.awt.Color getControlDarkShadow()
Returns the default control dark shadow Color

Returns:
Color

getControlHighlight

public static java.awt.Color getControlHighlight()
Returns the default control highlight Color

Returns:
Color

getControlLightHighlight

public static java.awt.Color getControlLightHighlight()
Returns the default control highlight Color

Returns:
Color

getControlText

public static final java.awt.Color getControlText()
Returns the default control text Color

Returns:
Color

getWindowBackground

public static java.awt.Color getWindowBackground()
Returns the default window background Color

Returns:
Color

getText

public static java.awt.Color getText()
Returns the default text Color

Returns:
Color

getTextHighlight

public static java.awt.Color getTextHighlight()
Returns the default text highlight Color

Returns:
Color

getTextHighlightText

public static java.awt.Color getTextHighlightText()
Returns:

getFocus

public static java.awt.Color getFocus()
Returns the default focus Color

Returns:
Color
See Also:
MetalLookAndFeel.getFocusColor()

getCosyControl

public static java.awt.Color getCosyControl()
Returns the default CosyBeans control Color

Returns:
Color

getCosyControlHighlight

public static java.awt.Color getCosyControlHighlight()
Returns the default CosyBeans control highlight Color

Returns:
Color

getCosyControlShadow

public static java.awt.Color getCosyControlShadow()
Returns the default CosyBeans control shadow Color

Returns:
Color

getCosyControlDarkShadow

public static java.awt.Color getCosyControlDarkShadow()
Returns the default CosyBeans control dark shadow Color

Returns:
Color

getCosyControlText

public static java.awt.Color getCosyControlText()
Returns the default CosyBenas control text Color

Returns:
Color

getCosyInputBackground

public static java.awt.Color getCosyInputBackground()
Returns the default CosyBeans input background Color

Returns:
Color

getCosyErrorText

public static java.awt.Color getCosyErrorText()
Returns the default CosyBeans error text Color

Returns:
Color

getCosyOverlay

public static java.awt.Color getCosyOverlay()
Returns the default CosyBeans overlay Color

Returns:
Color

getTimeOut

public static java.awt.Color getTimeOut()
Returns the default CosyBeans timeout Color.

Returns:
Color

getTimeOutOutline

public static java.awt.Color getTimeOutOutline()

getWarning

public static java.awt.Color getWarning()
Returns the default CosyBeans warning Color.

Returns:
Color

getWarningOutline

public static java.awt.Color getWarningOutline()
Returns the default CosyBeans warning outline Color.

Returns:
Color

getError

public static java.awt.Color getError()
Returns the default Color used to render errors.

Returns:
Color

getAlarm

public static java.awt.Color getAlarm()
Returns the default CosyBeans alarm Color.

Returns:
Color that should be used to render alarm states

getAlarmInvalid

public static java.awt.Color getAlarmInvalid()
Returns the default CosyBeans alarm Color.

Returns:
Color that should be used to render alarm states

getAlarmMajor

public static java.awt.Color getAlarmMajor()
Returns the default CosyBeans alarm Color.

Returns:
Color that should be used to render alarm states

getAlarmMinor

public static java.awt.Color getAlarmMinor()
Returns the default CosyBeans alarm Color.

Returns:
Color that should be used to render alarm states

getAlarmMinorBackground

public static java.awt.Color getAlarmMinorBackground()
Returns the default CosyBeans alarm Color.

Returns:
Color that should be used to render alarm states

getAlarmInvalidBackground

public static java.awt.Color getAlarmInvalidBackground()
Returns the default CosyBeans alarm Color.

Returns:
Color that should be used to render alarm states

getAlarmMajorBackground

public static java.awt.Color getAlarmMajorBackground()
Returns the default CosyBeans alarm Color.

Returns:
Color that should be used to render alarm states

getAlarmOutline

public static java.awt.Color getAlarmOutline()
Returns the default CosyBeans alarm outline Color.

Returns:
Color that should be used to render outline of alarm symbols

getEmergency

public static java.awt.Color getEmergency()
Returns the default CosyBeans emergency Color.

Returns:
Color

getEmergencyOutline

public static java.awt.Color getEmergencyOutline()
Returns the default CosyBeans emergency outline Color.

Returns:
Color

getHyperlink

public static java.awt.Color getHyperlink()

setBackgroundForComponents

public static void setBackgroundForComponents(java.awt.Component[] components,
                                              java.awt.Color background)
Recursively sets the background color to all components. If one of the component is a Container, background is set for all components inside that container.

Parameters:
components - components to set background on
background - background color

setForegroundForComponents

public static void setForegroundForComponents(java.awt.Component[] components,
                                              java.awt.Color foreground)
Recursively sets the foreground color to all components. If one of the component is a Container, foreground is set for all components inside that container.

Parameters:
components - components to set foreground on
foreground - foreground color


Copyright © 2010. All Rights Reserved.