Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.GC.fillGradientRectangle()


      gc.drawLine(marginWidth, marginHeight, bounds.width - 1,
          marginHeight);
    }
    if ((getExpansionStyle() & TITLE_BAR) != 0 || isExpanded()) {
      // left vertical edge gradient
      gc.fillGradientRectangle(marginWidth, marginHeight + 2, 1,
          gradientheight - 2, true);
      // right vertical edge gradient
      gc.fillGradientRectangle(bounds.width - marginWidth - 1,
          marginHeight + 2, 1, gradientheight - 2, true);
    }
View Full Code Here


    if ((getExpansionStyle() & TITLE_BAR) != 0 || isExpanded()) {
      // left vertical edge gradient
      gc.fillGradientRectangle(marginWidth, marginHeight + 2, 1,
          gradientheight - 2, true);
      // right vertical edge gradient
      gc.fillGradientRectangle(bounds.width - marginWidth - 1,
          marginHeight + 2, 1, gradientheight - 2, true);
    }
    if ((getExpansionStyle() & TITLE_BAR) != 0) {
      // New in 3.3 - edge treatmant
      gc.setForeground(getBackground());
View Full Code Here

        Rectangle bounds = composite.getBounds();
        GC gc = e.gc;
        gc.setForeground(colors.getColor(IFormColors.SEPARATOR));
        if (colors.getBackground() != null)
          gc.setBackground(colors.getBackground());
        gc.fillGradientRectangle(0, 0, bounds.width, bounds.height,
            false);
      }
    });
    if (parent instanceof Section)
      ((Section) parent).setSeparatorControl(composite);
View Full Code Here

                    Rectangle rect = bar.getBounds();
                    Image newImage = new Image (display , Math.max (1, rect.width), 1)
                    GC gc = new GC (newImage);
                    gc.setForeground (display.getSystemColor (color1));
                    gc.setBackground (display.getSystemColor (color2));
                    gc.fillGradientRectangle (rect.x, rect.y, rect.width, 1, false);
                    gc.dispose ();
                    final Image oldImage = bar.getBackgroundImage();
                    bar.setBackgroundImage (newImage);
                    if (oldImage != null) {
                        oldImage.dispose();
View Full Code Here

            }

            private void drawGradient(GC gc, Rectangle clArea) {
                gc.setForeground(Popup.this.colors.getBackground());
                gc.setBackground(Popup.this.colors.getColor(IFormColors.TB_BG));
                gc.fillGradientRectangle(clArea.x, clArea.y, clArea.width, clArea.height, true);
            }
        });

        GridLayout layout = new GridLayout(1, false);
        layout.marginWidth = 0;
View Full Code Here

        Rectangle bounds = composite.getBounds();
        GC gc = e.gc;
        gc.setForeground(colors.getColor(IFormColors.SEPARATOR));
        if (colors.getBackground() != null)
          gc.setBackground(colors.getBackground());
        gc.fillGradientRectangle(0, 0, bounds.width, bounds.height,
            false);
      }
    });
    if (parent instanceof Section)
      ((Section) parent).setSeparatorControl(composite);
View Full Code Here

            marginWidth, theight);
      }
    } else if (isExpanded()) {
      gc.setForeground(bg);
      gc.setBackground(getBackground());
      gc.fillGradientRectangle(marginWidth, marginHeight, bounds.width
          - marginWidth - marginWidth, theight, true);
    }
    gc.setBackground(getBackground());
    FormUtil.setAntialias(gc, SWT.ON);
    // repair the upper left corner
View Full Code Here

      gc.drawLine(marginWidth, marginHeight, bounds.width - 1,
          marginHeight);
    }
    if ((getExpansionStyle() & TITLE_BAR) != 0 || isExpanded()) {
      // left vertical edge gradient
      gc.fillGradientRectangle(marginWidth, marginHeight + 2, 1,
          gradientheight - 2, true);
      // right vertical edge gradient
      gc.fillGradientRectangle(bounds.width - marginWidth - 1,
          marginHeight + 2, 1, gradientheight - 2, true);
    }
View Full Code Here

    if ((getExpansionStyle() & TITLE_BAR) != 0 || isExpanded()) {
      // left vertical edge gradient
      gc.fillGradientRectangle(marginWidth, marginHeight + 2, 1,
          gradientheight - 2, true);
      // right vertical edge gradient
      gc.fillGradientRectangle(bounds.width - marginWidth - 1,
          marginHeight + 2, 1, gradientheight - 2, true);
    }
    if ((getExpansionStyle() & TITLE_BAR) != 0) {
      // New in 3.3 - edge treatmant
      gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WHITE));
View Full Code Here

    GC gc = new GC(image);
    gc.setBackground(getBackground());
    gc.fillRectangle(0, 0, 1, realtheight);
    gc.setForeground(bg);
    gc.setBackground(getBackground());
    gc.fillGradientRectangle(0, marginHeight + 2, 1, theight - 2, true);
    gc.dispose();
    super.setBackgroundImage(image);
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.