Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.RGB


  Color getBorder() {
    return fBorder;
  }

  private void createBorderColor() {
    RGB tbBorder = getSystemColor(SWT.COLOR_TITLE_BACKGROUND);
    RGB bg = getImpliedBackground().getRGB();

    // Group 1
    // Rule: If at least 2 of the RGB values are equal to or between 180 and
    // 255, then apply specified opacity for Group 1
    // Examples: Vista, XP Silver, Wn High Con #2
View Full Code Here


    fBorder = OwlUI.getColor(fResources, tbBorder);
  }

  private void createGradientColors() {
    RGB titleBg = getSystemColor(SWT.COLOR_TITLE_BACKGROUND);
    Color bgColor = getImpliedBackground();
    RGB bg = bgColor.getRGB();
    RGB bottom, top;

    // Group 1
    // Rule: If at least 2 of the RGB values are equal to or between 180 and
    // 255, then apply specified opacity for Group 1
    // Examples: Vista, XP Silver, Wn High Con #2
View Full Code Here

    fBiggestFontCSS = "font-size: " + biggest + fontUnit + ";";
  }

  /* Init the Theme Color (from UI Thread) */
  private void createColors() {
    RGB stickyRgb = OwlUI.getThemeRGB(OwlUI.STICKY_BG_COLOR_ID, new RGB(255, 255, 128));
    fStickyBGColorCSS = "background-color: rgb(" + stickyRgb.red + "," + stickyRgb.green + "," + stickyRgb.blue + ");";
  }
View Full Code Here

    /* Check Cached version first */
    if (fgCachedOSTheme != null)
      return fgCachedOSTheme;

    RGB widgetBackground = display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND).getRGB();
    RGB listSelection = display.getSystemColor(SWT.COLOR_LIST_SELECTION).getRGB();

    /* Theme: Windows Blue */
    if (widgetBackground.equals(new RGB(236, 233, 216)) && listSelection.equals(new RGB(49, 106, 197)))
      fgCachedOSTheme = OSTheme.WINDOWS_BLUE;

    /* Theme: Windows Classic */
    else if (widgetBackground.equals(new RGB(212, 208, 200)) && listSelection.equals(new RGB(10, 36, 106)))
      fgCachedOSTheme = OSTheme.WINDOWS_CLASSIC;

    /* Theme: Windows Silver */
    else if (widgetBackground.equals(new RGB(224, 223, 227)) && listSelection.equals(new RGB(178, 180, 191)))
      fgCachedOSTheme = OSTheme.WINDOWS_SILVER;

    /* Theme: Windows Olive */
    else if (widgetBackground.equals(new RGB(236, 233, 216)) && listSelection.equals(new RGB(147, 160, 112)))
      fgCachedOSTheme = OSTheme.WINDOWS_OLIVE;

    /* Any other Theme */
    else
      fgCachedOSTheme = OSTheme.OTHER;
View Full Code Here

   * @param label
   * @return Color
   */
  public static Color getColor(ResourceManager resources, ILabel label) {
    String color[] = label.getColor().split(",");
    RGB rgb = new RGB(Integer.parseInt(color[0]), Integer.parseInt(color[1]), Integer.parseInt(color[2]));

    return getColor(resources, rgb);
  }
View Full Code Here

  private void initResources() {

    /* Colors */
    fNotifierColors = new NotifierColors(getParentShell().getDisplay(), fResources);
    fStickyBgColor = OwlUI.getThemeColor(OwlUI.STICKY_BG_COLOR_ID, fResources, new RGB(255, 255, 128));

    /* Icons */
    fCloseImageNormal = OwlUI.getImage(fResources, "icons/etool16/close_normal.png");
    fCloseImagePressed = OwlUI.getImage(fResources, "icons/etool16/close_pressed.png");
    fItemStickyIcon = OwlUI.getImage(fResources, OwlUI.NEWS_PINNED);
View Full Code Here

    /* Font */
    FontData fontData = splash.getDisplay().getSystemFont().getFontData()[0];
    fVersionFont = new Font(splash.getDisplay(), fontData.getName(), 8, SWT.BOLD);

    /* Color */
    fVersionColor = new Color(splash.getDisplay(), new RGB(53, 53, 53));
  }
View Full Code Here

  private void initResources() {

    /* Colors */
    fNotifierColors = new NotifierColors(getParentShell().getDisplay(), fResources);
    fStickyBgColor = OwlUI.getThemeColor(OwlUI.STICKY_BG_COLOR_ID, fResources, new RGB(255, 255, 180));

    /* Icons */
    fCloseImageNormal = OwlUI.getImage(fResources, "icons/etool16/close_normal.png"); //$NON-NLS-1$
    fCloseImageHot = OwlUI.getImage(fResources, "icons/etool16/close_hot.png"); //$NON-NLS-1$
    fCloseImagePressed = OwlUI.getImage(fResources, "icons/etool16/close_pressed.png"); //$NON-NLS-1$
View Full Code Here

      @Override
      public void run() {
        LabelDialog dialog = new LabelDialog(shellProvider.getShell(), DialogMode.ADD, null);
        if (dialog.open() == IDialogConstants.OK_ID) {
          String name = dialog.getName();
          RGB color = dialog.getColor();

          ILabel newLabel = Owl.getModelFactory().createLabel(null, name);
          newLabel.setColor(OwlUI.toString(color));
          newLabel.setOrder(labels.size());
          DynamicDAO.save(newLabel);
View Full Code Here

        }

        /* Create new Label if necessary */
        if (label == null) {
          ILabel newLabel = Owl.getModelFactory().createLabel(null, labelValue);
          newLabel.setColor(OwlUI.toString(new RGB(0, 0, 0)));
          newLabel.setOrder(fExistingLabels.size());
          DynamicDAO.save(newLabel);
          fExistingLabels.add(newLabel);
          label = newLabel;
        }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.graphics.RGB

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.