Package org.eclipse.swt.graphics

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


        - (marginWidth * 2), bounds.height - (marginHeight * 2));
   
    GC gc = new GC(image);
    gc.setForeground(getBackground());
    gc.setBackground(getBackground());
    gc.fillRectangle(0, 0, bounds.width, bounds.height);
    gc.dispose();
   
    return image;
  }
}
View Full Code Here


            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);
View Full Code Here

        color = colors[COLOR_REQUESTED];
      }

      gcImage.setBackground(color);
      gcImage.fillRectangle(drawnWidth + 1, 1, nextWidth, y1);

      if (isCached[i]) {
        gcImage.setBackground(colors[COLOR_INCACHE]);
        gcImage.fillRectangle(drawnWidth + 1, 1, nextWidth, 3);
View Full Code Here

      gcImage.setBackground(color);
      gcImage.fillRectangle(drawnWidth + 1, 1, nextWidth, y1);

      if (isCached[i]) {
        gcImage.setBackground(colors[COLOR_INCACHE]);
        gcImage.fillRectangle(drawnWidth + 1, 1, nextWidth, 3);

      }

      drawnWidth += nextWidth;
View Full Code Here

        if (event.image != null && !Constants.isLinux) {
          try {
            GC gc = new GC(event.image);
            try {
              Rectangle bounds = event.image.getBounds();
              gc.fillRectangle(bounds);
              String title = MessageText.getString(
                  tableColumn.getTitleLanguageKey(), tableColumn.getName());
              String s = title
                  + " Column will be placed at the location you drop it, shifting other columns down";
              GCStringPrinter sp = new GCStringPrinter(gc, s, bounds, false, false,
View Full Code Here

    Image oldImg = img;
    Color color = ColorCache.getColor(display, rV, gV, bV);
    img = new Image(display,25,10);
    GC gc = new GC(img);
    gc.setBackground(color);
    gc.fillRectangle(0,0,25,10);
    gc.dispose();
    colorChooser.setImage(img);
    if(oldImg != null && ! oldImg.isDisposed())
      oldImg.dispose();
  }
View Full Code Here

      int limit = nbPieces == 0 ? 0 : ((drawWidth * nbComplete) / nbPieces);

      if (limit < drawWidth) {
        gcImage.setBackground(Colors.blues[Colors.BLUES_LIGHTEST]);
        gcImage.fillRectangle(limit + x0, borderHorizontalSize, x1 - limit,
            completionHeight);
      }

      gcImage.setBackground(Colors.colorProgressBar);
      gcImage.fillRectangle(x0, borderHorizontalSize, limit, completionHeight);
View Full Code Here

        gcImage.fillRectangle(limit + x0, borderHorizontalSize, x1 - limit,
            completionHeight);
      }

      gcImage.setBackground(Colors.colorProgressBar);
      gcImage.fillRectangle(x0, borderHorizontalSize, limit, completionHeight);
    } catch (Exception e) {
      System.out.println("Error Drawing PiecesItem");
      Debug.printStackTrace(e);
    }
    gcImage.dispose();
View Full Code Here

              int  width   = (int)Math.ceil((x2-x1+1)*x_ratio);
              int  height  = (int)Math.ceil((y2-y1+1)*y_ratio );
             
              int  y_draw = usable_height + PAD_TOP + PAD_TOP - y - height;
             
              gc.fillRectangle( x, y_draw, width, height );
                 
              int  text_metric = zone.getMetric();
             
              String text = String.valueOf( metric );
               
View Full Code Here

    GC gc = new GC(img);   
   
    gc.setForeground(white);
    gc.setBackground(white);
   
    gc.fillRectangle(size);
   
    if(SWT.getVersion() >= 3138 && antiAliasingAvailable) {
      try {
        //gc.setTextAntialias(SWT.ON);
        //gc.setAntialias(SWT.ON);
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.