Package org.eclipse.swt.graphics

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


      else if (inactiveBorder || control instanceof Table
          || control instanceof Tree || control instanceof TableTree) {
        Rectangle b = control.getBounds();
        GC gc = paintEvent.gc;
        gc.setForeground(NOAUIPlugin.getFormToolkit().getColors().getBorderColor());
        gc.drawRectangle(b.x - 1, b.y - 1, b.width + 1,
            b.height + 1);
      }
    }
  }
  //----------------------------------------------------------------------------
View Full Code Here


        // draw frame
        gc.setLineStyle(SWT.LINE_SOLID);
        gc.setLineWidth(1);
        gc.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_GRAY));
        gc.drawRectangle(0, 0, getSize().x - 1, getSize().y - 1);

        // draw content
        for (int i = 0; i < seriesArray.length; i++) {

            // draw plot line, symbol etc
View Full Code Here

        } else if (inactiveBorder || c instanceof Table
            || c instanceof Tree) {
          Rectangle b = c.getBounds();
          GC gc = event.gc;
          gc.setForeground(colors.getBorderColor());
          gc.drawRectangle(b.x - 1, b.y - 1, b.width + 1,
              b.height + 1);
        }
      }
    }
  }
View Full Code Here

        if (!inactiveBorder
            && (c instanceof Text || c instanceof CCombo || textBorder)) {
          Rectangle b = c.getBounds();
          GC gc = event.gc;
          gc.setForeground(c.getBackground());
          gc.drawRectangle(b.x - 1, b.y - 1, b.width + 1,
              b.height + 1);
          // gc.setForeground(getBorderStyle() == SWT.BORDER ? colors
          // .getBorderColor() : colors.getForeground());
          gc.setForeground(colors.getBorderColor());
          if (c instanceof CCombo)
View Full Code Here

              b.height + 1);
          // gc.setForeground(getBorderStyle() == SWT.BORDER ? colors
          // .getBorderColor() : colors.getForeground());
          gc.setForeground(colors.getBorderColor());
          if (c instanceof CCombo)
            gc.drawRectangle(b.x - 1, b.y - 1, b.width + 1,
                b.height + 1);
          else
            gc.drawRectangle(b.x - 1, b.y - 2, b.width + 1,
                b.height + 3);
        } else if (inactiveBorder || c instanceof Table
View Full Code Here

          gc.setForeground(colors.getBorderColor());
          if (c instanceof CCombo)
            gc.drawRectangle(b.x - 1, b.y - 1, b.width + 1,
                b.height + 1);
          else
            gc.drawRectangle(b.x - 1, b.y - 2, b.width + 1,
                b.height + 3);
        } else if (inactiveBorder || c instanceof Table
            || c instanceof Tree) {
          Rectangle b = c.getBounds();
          GC gc = event.gc;
View Full Code Here

                gc.drawImage(iconImage, horizontalAlignmentPadding,
                        verticalAlignmentPadding);

                Color originalFg = gc.getForeground();
                gc.setForeground(GUIHelper.COLOR_WIDGET_BORDER);
                gc.drawRectangle(0, 0, iconCanvasBounds.width - 1,
                        iconCanvasBounds.height - 1);
                gc.setForeground(originalFg);
            }

        });
View Full Code Here

    gc.setBackground(color);
    Rectangle rect = image.getBounds();
    gc.fillRectangle(rect);
    if (color.equals(device.getSystemColor(SWT.COLOR_BLACK)))
      gc.setForeground(device.getSystemColor(SWT.COLOR_WHITE));
    gc.drawRectangle(rect.x, rect.y, rect.width - 1, rect.height - 1);
    gc.dispose();
    return image;
  }

  /**
 
View Full Code Here

    GC gc = new GC(image);
    Rectangle rect = image.getBounds();
    Pattern pattern = new Pattern(device, rect.x, rect.y, rect.width - 1, rect.height - 1, color1, color2);
    gc.setBackgroundPattern(pattern);
    gc.fillRectangle(rect);
    gc.drawRectangle(rect.x, rect.y, rect.width - 1, rect.height - 1);
    gc.dispose();
    pattern.dispose();
    return image;
  }
View Full Code Here

    GC gc = new GC(image);
    gc.setBackground(color);
    Rectangle bounds = image.getBounds();
    gc.fillRectangle(0, 0, bounds.width, bounds.height);
    gc.setBackground(display.getSystemColor(SWT.COLOR_BLACK));
    gc.drawRectangle(0, 0, bounds.width - 1, bounds.height - 1);
    gc.dispose();
    return 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.