Class CSSSWTColorHelper

java.lang.Object
org.eclipse.e4.ui.css.swt.helpers.CSSSWTColorHelper

public class CSSSWTColorHelper extends Object
  • Field Details

  • Constructor Details

    • CSSSWTColorHelper

      public CSSSWTColorHelper()
  • Method Details

    • getSWTColor

      public static Color getSWTColor(RGBColor rgbColor, Display display)
    • getSWTColor

      public static Color getSWTColor(CSSValue value, Display display)
    • hasColorDefinitionAsValue

      public static boolean hasColorDefinitionAsValue(CSSValue value)
    • hasColorDefinitionAsValue

      public static boolean hasColorDefinitionAsValue(String name)
    • getRGBA

      public static RGBA getRGBA(String name)
    • getRGBA

      public static RGBA getRGBA(RGBColor color)
    • getRGBA

      public static RGBA getRGBA(CSSValue value)
    • getRGBA

      public static RGBA getRGBA(CSSPrimitiveValue value)
    • getPercent

      public static Integer getPercent(CSSPrimitiveValue value)
    • getGradient

      public static Gradient getGradient(CSSValueList list, Display display)
    • getSWTColors

      public static Color[] getSWTColors(Gradient grad, Display display, CSSEngine engine) throws Exception
      Throws:
      Exception
    • getPercents

      public static int[] getPercents(Gradient grad)
    • getRGBColor

      public static RGBColor getRGBColor(Color color)
    • getRGBColor

      public static RGBColor getRGBColor(RGB color)
    • setForeground

      public static void setForeground(Control control, Color newColor)
      Helper function to avoid setting colors unnecessarily
    • setBackground

      public static void setBackground(Control control, Color newColor)
      Helper function to avoid setting colors unnecessarily
    • setSelectionForeground

      public static void setSelectionForeground(CTabFolder folder, Color newColor)
      Helper function to avoid setting colors unnecessarily
    • setSelectionBackground

      public static void setSelectionBackground(CTabFolder folder, Color newColor)
      Helper function to avoid setting colors unnecessarily