Eclipse Platform
Release 3.1

org.eclipse.jface.resource
Class JFaceColors

java.lang.Object
  extended byorg.eclipse.jface.resource.JFaceColors

public class JFaceColors
extends Object

JFaceColors is the class that stores references to all of the colors used by JFace.


Constructor Summary
JFaceColors()
           
 
Method Summary
static void clearColor(String colorName)
          Deprecated. JFaceColors no longer maintains a cache of colors. This job is now handled by the ColorRegistry.
static void disposeColors()
          Deprecated. JFaceColors no longer maintains a cache of colors. This job is now handled by the ColorRegistry.
static Color getActiveHyperlinkText(Display display)
          Get the default color to use for displaying active hyperlinks.
static Color getBannerBackground(Display display)
          Get the Color used for banner backgrounds
static Color getBannerForeground(Display display)
          Get the Color used for banner foregrounds
static Color getErrorBackground(Display display)
          Get the background Color for widgets that display errors.
static Color getErrorBorder(Display display)
          Get the border Color for widgets that display errors.
static Color getErrorText(Display display)
          Get the default color to use for displaying errors.
static Color getHyperlinkText(Display display)
          Get the default color to use for displaying hyperlinks.
static void setColors(Control control, Color foreground, Color background)
          Set the foreground and background colors of the control to the specified values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JFaceColors

public JFaceColors()
Method Detail

getBannerBackground

public static Color getBannerBackground(Display display)
Get the Color used for banner backgrounds


getBannerForeground

public static Color getBannerForeground(Display display)
Get the Color used for banner foregrounds


getErrorBackground

public static Color getErrorBackground(Display display)
Get the background Color for widgets that display errors.


getErrorBorder

public static Color getErrorBorder(Display display)
Get the border Color for widgets that display errors.


getErrorText

public static Color getErrorText(Display display)
Get the default color to use for displaying errors.


getHyperlinkText

public static Color getHyperlinkText(Display display)
Get the default color to use for displaying hyperlinks.


getActiveHyperlinkText

public static Color getActiveHyperlinkText(Display display)
Get the default color to use for displaying active hyperlinks.


clearColor

public static void clearColor(String colorName)
Deprecated. JFaceColors no longer maintains a cache of colors. This job is now handled by the ColorRegistry.

Clear out the cached color for name. This is generally done when the color preferences changed and any cached colors may be disposed. Users of the colors in this class should add a IPropertyChangeListener to detect when any of these colors change.


disposeColors

public static void disposeColors()
Deprecated. JFaceColors no longer maintains a cache of colors. This job is now handled by the ColorRegistry.

Dispose of all allocated colors. Called on workbench shutdown.


setColors

public static void setColors(Control control,
                             Color foreground,
                             Color background)
Set the foreground and background colors of the control to the specified values. If the values are null than ignore them.

Parameters:
foreground - Color
background - Color

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.