Package org.eclipse.jface.resource
Class JFaceColors
java.lang.Object
org.eclipse.jface.resource.JFaceColors
JFaceColors is the class that stores references
to all of the colors used by JFace.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
clearColor
(String colorName) Deprecated.JFaceColors no longer maintains a cache of colors.static void
Deprecated.JFaceColors no longer maintains a cache of colors.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 Color
Background color intended for widgets that display text.static Color
Foreground color intended for widgets that display text.static void
Set the foreground and background colors of the control to the specified values.
-
Constructor Details
-
JFaceColors
public JFaceColors()
-
-
Method Details
-
getBannerBackground
- Parameters:
display
- the display the color is from- Returns:
- the Color used for banner backgrounds
- See Also:
-
getBannerForeground
- Parameters:
display
- the display the color is from- Returns:
- the Color used for banner foregrounds
- See Also:
-
getErrorBackground
- Parameters:
display
- the display the color is from- Returns:
- the background Color for widgets that display errors.
- See Also:
-
getErrorBorder
- Parameters:
display
- the display the color is from- Returns:
- the border Color for widgets that display errors.
- See Also:
-
getErrorText
- Parameters:
display
- the display the color is from- Returns:
- the default color to use for displaying errors.
- See Also:
-
getHyperlinkText
- Parameters:
display
- the display the color is from- Returns:
- the default color to use for displaying hyperlinks, or
null
if the color definition does not exists. - See Also:
-
getActiveHyperlinkText
- Parameters:
display
- the display the color is from- Returns:
- the default color to use for displaying active hyperlinks, or
null
if the color definition does not exists. - See Also:
-
getInformationViewerBackgroundColor
Background color intended for widgets that display text. This color is compatible with with Gtk system themes, for example on the white theme this color is white and on the dark theme it is dark.Note, there is no need to free this color because it's a color managed by the system not the application.
- Parameters:
display
- the display the color is from- Returns:
- Color most suitable for presenting text background depending on the platform, to match the rest of the environment.
- Since:
- 3.13
-
getInformationViewerForegroundColor
Foreground color intended for widgets that display text. This color is compatible with with Gtk system themes, for example on the white theme this color is black and on the dark theme it is bright.Note, there is no need to free this color because it's a color managed by the system not the application.
- Parameters:
display
- the display the color is from- Returns:
- Color most suitable for presenting text foreground depending on the platform, to match the rest of the environment.
- Since:
- 3.13
-
clearColor
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
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
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 setforeground
- Color the foreground color (maybenull
)background
- Color the background color (maybenull
)
-