Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.resource
Class JFaceColors


java.lang.Object
  extended by 
org.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)
           
static  Color getBannerBackground ( Display display)
           
static  Color getBannerForeground ( Display display)
           
static  Color getErrorBackground ( Display display)
           
static  Color getErrorBorder ( Display display)
           
static  Color getErrorText ( Display display)
           
static  Color getHyperlinkText ( Display display)
           
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)
Parameters:
display - the display the color is from
Returns:
the Color used for banner backgrounds
See Also:
SWT.COLOR_LIST_BACKGROUND, Display.getSystemColor(int)

getBannerForeground

public static 
Color getBannerForeground(
Display display)
Parameters:
display - the display the color is from
Returns:
the Color used for banner foregrounds
See Also:
SWT.COLOR_LIST_FOREGROUND, Display.getSystemColor(int)

getErrorBackground

public static 
Color getErrorBackground(
Display display)
Parameters:
display - the display the color is from
Returns:
the background Color for widgets that display errors.
See Also:
SWT.COLOR_WIDGET_BACKGROUND, Display.getSystemColor(int)

getErrorBorder

public static 
Color getErrorBorder(
Display display)
Parameters:
display - the display the color is from
Returns:
the border Color for widgets that display errors.
See Also:
SWT.COLOR_WIDGET_DARK_SHADOW, Display.getSystemColor(int)

getErrorText

public static 
Color getErrorText(
Display display)
Parameters:
display - the display the color is from
Returns:
the default color to use for displaying errors.
See Also:
ColorRegistry.get(String), JFacePreferences.ERROR_COLOR

getHyperlinkText

public static 
Color getHyperlinkText(
Display display)
Parameters:
display - the display the color is from
Returns:
the default color to use for displaying hyperlinks.
See Also:
ColorRegistry.get(String), JFacePreferences.HYPERLINK_COLOR

getActiveHyperlinkText

public static 
Color getActiveHyperlinkText(
Display display)
Parameters:
display - the display the color is from
Returns:
the default color to use for displaying active hyperlinks.
See Also:
ColorRegistry.get(String), JFacePreferences.ACTIVE_HYPERLINK_COLOR

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.

Parameters:
colorName - name of the color

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:
control - the control the foreground and/or background color should be set
foreground - Color the foreground color (maybe null)
background - Color the background color (maybe null)

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire