Example #1
0
 public static Color getSystemColor(String key, Color defaultValue) {
   if (Styles.FillColor.equals(key)) {
     return Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
   } else if (Styles.LineColor.equals(key)) {
     return Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BORDER);
   } else if (Styles.TextColor.equals(key)) {
     return Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND);
   }
   return defaultValue;
 }
Example #2
0
 private static RGB getSystemRGB(String key, RGB defaultValue) {
   if (Styles.FillColor.equals(key)) {
     return Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND).getRGB();
   } else if (Styles.LineColor.equals(key)) {
     return Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BORDER).getRGB();
   } else if (Styles.TextColor.equals(key)) {
     return Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND).getRGB();
   }
   return defaultValue;
 }