Package org.eclipse.swt.graphics

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


        GC gc = new GC(footer);
        gc.setForeground(Display.getCurrent().getSystemColor(
            SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
        gc.setBackground(Display.getCurrent().getSystemColor(
            SWT.COLOR_WIDGET_BACKGROUND));
        gc.fillGradientRectangle(0, 0, footer.getClientArea().width,
            footer.getClientArea().height, true);
        gc.setForeground(Display.getCurrent().getSystemColor(
            SWT.COLOR_WIDGET_NORMAL_SHADOW));
        gc.setLineWidth(1);
        gc.drawLine(0, 1, footer.getClientArea().width, 1);
View Full Code Here


        GC gc = e.gc;
        gc.setForeground(Display.getCurrent().getSystemColor(
            SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
        gc.setBackground(Display.getCurrent().getSystemColor(
            SWT.COLOR_WIDGET_BACKGROUND));
        gc.fillGradientRectangle(0, 0, title.getClientArea().width,
            title.getClientArea().height - 2, true);
        gc.setForeground(Display.getCurrent().getSystemColor(
            SWT.COLOR_WIDGET_NORMAL_SHADOW));
        gc.setLineWidth(1);
        gc.drawLine(0, title.getClientArea().height - 2, title
View Full Code Here

        footer.addListener(SWT.Paint, new Listener() {
            public void handleEvent(Event arg0) {
                GC gc = new GC(footer);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
                gc.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
                gc.fillGradientRectangle(0, 0, footer.getClientArea().width, footer.getClientArea().height, true);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
                gc.setLineWidth(1);
                gc.drawLine(0, 1, footer.getClientArea().width, 1);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
                gc.drawLine(0, 2, footer.getClientArea().width, 2);
View Full Code Here

        title.addPaintListener(new PaintListener() {
            public void paintControl(PaintEvent e) {
                GC gc = e.gc;
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
                gc.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
                gc.fillGradientRectangle(0, 0, title.getClientArea().width, title.getClientArea().height - 2, true);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
                gc.setLineWidth(1);
                gc.drawLine(0, title.getClientArea().height - 2, title.getClientArea().width, title.getClientArea().height - 2);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
                gc.drawLine(0, title.getClientArea().height - 1, title.getClientArea().width, title.getClientArea().height - 1);
View Full Code Here

        screenMessageLabel.addPaintListener(new PaintListener() {
            public void paintControl(PaintEvent e) {
                GC gc = e.gc;
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
                gc.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
                gc.fillGradientRectangle(0, 0, mainPanel.getClientArea().width, 30, true);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
                gc.setLineWidth(1);
                gc.drawLine(0, 30, mainPanel.getClientArea().width, 30);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND));
View Full Code Here

        footer.addListener(SWT.Paint, new Listener() {
            public void handleEvent(Event arg0) {
                GC gc = new GC(footer);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
                gc.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
                gc.fillGradientRectangle(0, 0, footer.getClientArea().width, footer.getClientArea().height, true);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
                gc.setLineWidth(1);
                gc.drawLine(0, 1, footer.getClientArea().width, 1);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
                gc.drawLine(0, 2, footer.getClientArea().width, 2);
View Full Code Here

        title.addPaintListener(new PaintListener() {
            public void paintControl(PaintEvent e) {
                GC gc = e.gc;
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
                gc.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
                gc.fillGradientRectangle(0, 0, title.getClientArea().width, title.getClientArea().height - 2, true);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
                gc.setLineWidth(1);
                gc.drawLine(0, title.getClientArea().height - 2, title.getClientArea().width, title.getClientArea().height - 2);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
                gc.drawLine(0, title.getClientArea().height - 1, title.getClientArea().width, title.getClientArea().height - 1);
View Full Code Here

      }

      private void drawGradient(GC gc, Rectangle clArea) {
        gc.setForeground(color.getGradientBegin());
        gc.setBackground(color.getGradientEnd());
        gc.fillGradientRectangle(clArea.x, clArea.y, clArea.width, clArea.height, true);
      }

      private void fixRegion(GC gc, Rectangle clArea) {
        gc.setForeground(color.getBorder());
View Full Code Here

      GC gc = new GC(image);
      gc.setBackground(color1);
      gc.fillRectangle(0, 0, 1, fLength);
      gc.setForeground(color2);
      gc.setBackground(color1);
      gc.fillGradientRectangle(0, fMarginHeight + 2, 1, fTheight - 2, true);
      gc.dispose();
      color1.dispose();
      color2.dispose();
      return image;
    }
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

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.