Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Color


    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    composite.setLayout(layout);
 

    Color bg = getShell().getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);

    GridData tblLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);

    _table = new Table(composite, SWT.FULL_SELECTION | SWT.BORDER );
    _table.setHeaderVisible(true);
View Full Code Here


      int offsetY = rect.height;
     
      gc.setForeground(Colors.green);
      for (int i = 0; i <= connected; i++)
      {
        Color curColor;
        if (i == 0)
          curColor = Colors.colorError;
        else if (i <= seeds)
          curColor = Colors.green;
        else
View Full Code Here

      host_torrent.setData("GUI_Uploaded", new Long(uploaded));
      host_torrent.setData("GUI_Downloaded", new Long(downloaded));
      host_torrent.setData("GUI_Left", new Long(left));

      if ( seed_count != 0 ){
        Color fg = row.getForeground();
       
        if (fg != null && fg.equals(Colors.blues[Colors.BLUES_MIDDARK])) {
          row.setForeground(Colors.blues[Colors.BLUES_MIDDARK]);
        }
      }
    }
  }  
View Full Code Here

            if(encryptToggle.getSelection()){
                Messages.setLanguageText(encryptToggle,"SpeedTestWizard.test.panel.encrypted");
                originalColor = encryptToggle.getForeground();
                //Color highlightColor = ColorCache.getColor(display,178,78,127);
                Color highlightColor = display.getSystemColor(SWT.COLOR_DARK_YELLOW);
                encryptToggle.setBackground(highlightColor);
            }else{
                Messages.setLanguageText(encryptToggle,"SpeedTestWizard.test.panel.standard");
                if(originalColor!=null){
                    encryptToggle.setBackground(originalColor);
View Full Code Here

      diffHue = hslScheme.getHue() - hslDefault.getHue();
      diffSatPct = hslScheme.getSaturation() == 0 ? 0 : (float) hslDefault.getSaturation() / hslScheme.getSaturation();
      diffLumPct = hslScheme.getLuminence() == 0 ? 0 : (float) hslDefault.getLuminence() / hslScheme.getLuminence();

      HSLColor hslColor = new HSLColor();
      Color colorTables = display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
      int tR = colorTables.getRed();
      int tG = colorTables.getGreen();
      int tB = colorTables.getBlue();
     
      // 0 == window background (white)
      // [blues.length-1] == rgb
      // in between == blend
      for (int i = 0; i < blues.length; i++) {
View Full Code Here

    if (display == null || display.isDisposed())
      return;

    Utils.execSWTThread(new AERunnable() {
      public void runSupport() {
        Color colorTables = display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
        HSLColor hslColor = new HSLColor();
        hslColor.initHSLbyRGB(colorTables.getRed(), colorTables.getGreen(),
            colorTables.getBlue());
        int lum = hslColor.getLuminence();
        int sat = hslColor.getSaturation();

        lum = (int)((lum > 127) ? lum * 0.8 : lum * 1.3);
       
 
View Full Code Here

    if (display == null || display.isDisposed())
      return;

    Utils.execSWTThread(new AERunnable() {
      public void runSupport() {
        Color colorTables = display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
        HSLColor hslBG = new HSLColor();
        hslBG.initHSLbyRGB(colorTables.getRed(), colorTables.getGreen(),
            colorTables.getBlue());
        int lum = hslBG.getLuminence();

        HSLColor hslColor = new HSLColor();
        hslColor.initRGBbyHSL(25, 200, 128 + (lum < 160 ? 10 : -10));
        colorWarning = new AllocateColor("warning", new RGB(hslColor.getRed(),
View Full Code Here

    if (display == null || display.isDisposed())
      return;

    Utils.execSWTThread(new AERunnable() {
      public void runSupport() {
        Color colorTables = display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
        HSLColor hslColor = new HSLColor();
        hslColor.initHSLbyRGB(colorTables.getRed(), colorTables.getGreen(),
            colorTables.getBlue());

        int lum = hslColor.getLuminence();
        int sat = hslColor.getSaturation();
        int hue = hslColor.getHue();
        if (lum > 127) {
View Full Code Here

        Image result= new Image(display, width, height);

        GC gc= new GC(result);

        Color colorC= createColor(SWT.COLOR_WIDGET_BACKGROUND, SWT.COLOR_LIST_BACKGROUND, 35, display);
        Color colorD= createColor(SWT.COLOR_WIDGET_BACKGROUND, SWT.COLOR_LIST_BACKGROUND, 45, display);
        Color colorE= createColor(SWT.COLOR_WIDGET_BACKGROUND, SWT.COLOR_LIST_BACKGROUND, 80, display);
        Color colorF= createColor(SWT.COLOR_WIDGET_BACKGROUND, SWT.COLOR_LIST_BACKGROUND, 70, display);
        Color colorG= createColor(SWT.COLOR_WIDGET_BACKGROUND, SWT.COLOR_WHITE, 45, display);
        Color colorH= createColor(SWT.COLOR_WIDGET_NORMAL_SHADOW, SWT.COLOR_LIST_BACKGROUND, 35, display);

        try {
            drawLine(width, 0, colorC, gc);
            drawLine(width, 1, colorC, gc);

            gc.setForeground(colorD);
            gc.setBackground(colorE);
            gc.fillGradientRectangle(0, 2, width, 2 + 8, true);

            gc.setBackground(colorE);
            gc.fillRectangle(0, 2 + 9, width, height - 4);

            drawLine(width, height - 3, colorF, gc);
            drawLine(width, height - 2, colorG, gc);
            drawLine(width, height - 1, colorH, gc);

        } finally {
            gc.dispose();

            colorC.dispose();
            colorD.dispose();
            colorE.dispose();
            colorF.dispose();
            colorG.dispose();
            colorH.dispose();
        }

        return result;
    }
View Full Code Here

        RGB rgb1= display.getSystemColor(color1).getRGB();
        RGB rgb2= display.getSystemColor(color2).getRGB();

        RGB blend= FormColors.blend(rgb2, rgb1, ratio);

        return new Color(display, blend);
    }
View Full Code Here

TOP

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

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.