Package org.eclipse.swt.graphics

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


          gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height, true);

          // draw shell edge
          gc.setLineWidth(2);
          gc.setForeground(_borderColor);
          gc.drawRectangle(rect.x + 1, rect.y + 1, rect.width - 2, rect.height - 2);
          // remember to dipose the GC object!
          gc.dispose();

          // now set the background image on the shell
          _shell.setBackgroundImage(newImage);
View Full Code Here


    Display display = fButton.getDisplay();

    GC gc = new GC(fImage);
    gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
    gc.drawRectangle(0, 2, fExtent.x - 1, fExtent.y - 4);

    if (fColor != null)
      fColor.dispose();

    fColor = new Color(display, fColorValue);
View Full Code Here

                  rect.width, rect.height, true);

              // draw shell edge
              gc.setLineWidth(2);
              gc.setForeground(borderColor);
              gc.drawRectangle(rect.x + 1, rect.y + 1,
                  rect.width - 2, rect.height - 2);
              // remember to dipose the GC object!
              gc.dispose();

              // now set the background image on the shell
View Full Code Here

          gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height, true);

          // draw shell edge
          gc.setLineWidth(2);
          gc.setForeground(_borderColor);
          gc.drawRectangle(rect.x + 1, rect.y + 1, rect.width - 2, rect.height - 2);
          // remember to dipose the GC object!
          gc.dispose();

          // now set the background image on the shell
          shell.setBackgroundImage(newImage);
View Full Code Here

          gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height, true);

          // draw shell edge
          gc.setLineWidth(2);
          gc.setForeground(_borderColor);
          gc.drawRectangle(rect.x + 1, rect.y + 1, rect.width - 2, rect.height - 2);
          // remember to dipose the GC object!
          gc.dispose();

          // now set the background image on the shell
          shell.setBackgroundImage(newImage);
View Full Code Here

    int y = rect.height - 15;
    int x;
    if(!visible) x = 2; else x = rect.width-25;
    gc.fillRectangle(x-1, y-5, 15, 15);
    gc.setForeground(new Color(getDisplay(), 170, 170, 170));  
    gc.drawRectangle(x-1, y-5, 15, 15);

    if(!visible){
      x = 4
      gc.drawLine(x,y,     x+2,y+2);
      gc.drawLine(x+2,y+2, x,y+4);
View Full Code Here

      gc.setForeground(mCheckBoxBorderOuter_Hover);
    }

    if (!isEnabled()) gc.setForeground(mCheckBoxBorderOuter_Disabled);

    gc.drawRectangle(x, y, cbWidth, cbHeight);

    if (getSelection()) {
      gc.setForeground(mCheckBoxBorderInner_Normal);
    } else {
      gc.setForeground(mCheckBoxBorderInner_Hover);
View Full Code Here

      gc.setForeground(mCheckBoxBorderInner_Hover);
    }

    if (!isEnabled()) gc.setForeground(mCheckBoxBorderInner_Disabled);

    gc.drawRectangle(x+1, y+1, cbWidth-2, cbHeight-2);

    Color outerTopLeft = null;
    Color outerBottomRight = null;
    Color innerTopLeft = null;
    Color innerBottomRight = null;
View Full Code Here

      gc.fillGradientRectangle(2, pos+2, rect.width-9, gradientHeight-36, true);
      pos += gradientHeight;     
    }

    gc.setForeground(new Color(getDisplay(), 245, 245, 245))
    gc.drawRectangle(0, 0, rect.width - 6, rect.height - 33);

    if (pos < rect.height) {
      gc.setBackground(getBackground());
      gc.fillRoundRectangle(0, pos, rect.width, rect.height - pos, 3, 4);
    }    
View Full Code Here

    private void drawPhoto(Image imageToLoad) {
      final Image image = new Image(getDisplay(), imageToLoad.getImageData());
        GC gc = new GC(photoCanvas);
        gc.drawImage(image,0,0,image.getBounds().width,image.getBounds().height, 0, 0, 362, 198);
        gc.drawRectangle(0,0,photoCanvas.getBounds().width-1,photoCanvas.getBounds().height-1);
        photoCanvas.addListener(SWT.Paint, new Listener(){
            public void handleEvent(Event arg0) {
                GC gc = new GC(photoCanvas);
                gc.drawImage(image,0,0,image.getBounds().width,image.getBounds().height,0,0,362,198);
                gc.drawRectangle(0,0,photoCanvas.getBounds().width-1,photoCanvas.getBounds().height-1);     
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.