Class CSSSWTColorHelper
java.lang.Object
org.eclipse.e4.ui.css.swt.helpers.CSSSWTColorHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GradientgetGradient(CssValues.CssList list, Display display) static IntegergetPercent(CssValues.CssPrimitive value) static int[]getPercents(Gradient grad) static RGBAstatic RGBAgetRGBA(CssValues.CssColor color) static RGBAgetRGBA(CssValues.CssPrimitive value) static RGBAstatic CssValues.CssColorgetRGBColor(Color color) static CssValues.CssColorgetRGBColor(RGB color) static ColorgetSWTColor(CssValues.CssColor rgbColor) static ColorgetSWTColor(CSSValue value, Display display) static Color[]getSWTColors(Gradient grad, Display display, CSSEngine engine) static booleanstatic booleanstatic booleanReturns whether the value looks like a color definition reference but resolves neither to a color, such as an SWT system color, nor to a definition.static voidresetBackground(CTabItem item) Resets per-item background and selection background colors that were applied by CSS, preserving colors set programmatically.static voidresetForeground(CTabItem item) Resets per-item foreground and selection foreground colors that were applied by CSS, preserving colors set programmatically.static voidsetBackground(CTabItem item, Color newColor) Sets the per-item background color on aCTabItemand records it soresetBackground(CTabItem)only resets CSS-applied colors.static voidsetBackground(Control control, Color newColor) Sets the color unless the control already has it.static voidsetForeground(CTabItem item, Color newColor) Sets the per-item foreground color on aCTabItemand records it soresetForeground(CTabItem)only resets CSS-applied colors.static voidsetForeground(Control control, Color newColor) Sets the color unless the control already has it.static voidsetSelectionBackground(CTabFolder folder, Color newColor) Helper function to avoid setting colors unnecessarilystatic voidsetSelectionBackground(CTabItem item, Color newColor) Sets the per-item selection background color on aCTabItemand records it soresetBackground(CTabItem)only resets CSS-applied colors.static voidsetSelectionForeground(CTabFolder folder, Color newColor) Helper function to avoid setting colors unnecessarilystatic voidsetSelectionForeground(CTabItem item, Color newColor) Sets the per-item selection foreground color on aCTabItemand records it soresetForeground(CTabItem)only resets CSS-applied colors.
-
Field Details
-
COLOR_DEFINITION_MARKER
- See Also:
-
-
Constructor Details
-
CSSSWTColorHelper
public CSSSWTColorHelper()
-
-
Method Details
-
getSWTColor
-
getSWTColor
-
hasColorDefinitionAsValue
-
isUnresolvedColorDefinition
Returns whether the value looks like a color definition reference but resolves neither to a color, such as an SWT system color, nor to a definition. -
hasColorDefinitionAsValue
-
getRGBA
-
getRGBA
-
getRGBA
-
getRGBA
-
getPercent
-
getGradient
-
getSWTColors
-
getPercents
-
getRGBColor
-
getRGBColor
-
setForeground
-
setBackground
-
setSelectionForeground
Helper function to avoid setting colors unnecessarily -
setSelectionBackground
Helper function to avoid setting colors unnecessarily -
setForeground
Sets the per-item foreground color on aCTabItemand records it soresetForeground(CTabItem)only resets CSS-applied colors. -
setSelectionForeground
Sets the per-item selection foreground color on aCTabItemand records it soresetForeground(CTabItem)only resets CSS-applied colors. -
resetForeground
Resets per-item foreground and selection foreground colors that were applied by CSS, preserving colors set programmatically. -
setBackground
Sets the per-item background color on aCTabItemand records it soresetBackground(CTabItem)only resets CSS-applied colors. -
setSelectionBackground
Sets the per-item selection background color on aCTabItemand records it soresetBackground(CTabItem)only resets CSS-applied colors. -
resetBackground
Resets per-item background and selection background colors that were applied by CSS, preserving colors set programmatically.
-