Package org.eclipse.swt.graphics

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


            new org.eclipse.swt.graphics.Color(display,r,g,b );

        GC gc = new GC(newImage);
        try {
            gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
            gc.drawRectangle(0, 0, bounds.width - 1, bounds.height - 1);
            int alpha = color.getAlpha();
            gc.setAlpha(alpha);
            gc.setBackground(color2);
            gc.fillRectangle(1, 1, bounds.width - 2, bounds.height - 2);
        } finally {
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

                    gc.fillRectangle( 8,7, 5, 5 );
                }
                if( c != null ){
                    gc.setForeground( color( c ) );
                    gc.setAlpha(c.getAlpha());
                    gc.drawRectangle( 8,7, 5, 5 );
                }
                ImageData clone = (ImageData) swtImage.getImageData().clone();               
                swtImage.dispose();
                gc.dispose();               
                return clone;
View Full Code Here

                gc.setBackground( c = color( finalD ));
                gc.fillRectangle( 7, 7, 15, 15 );               
                c.dispose();
               
                gc.setForeground( c = color( Color.BLACK ) );
                gc.drawRectangle( 0, 0, 7, 7 );
                gc.drawRectangle( 0, 0, 15, 7 );
                gc.drawRectangle( 0, 0, 7, 15 );
                gc.drawRectangle( 0, 0, 15, 15 );
                c.dispose();
               
View Full Code Here

                gc.fillRectangle( 7, 7, 15, 15 );               
                c.dispose();
               
                gc.setForeground( c = color( Color.BLACK ) );
                gc.drawRectangle( 0, 0, 7, 7 );
                gc.drawRectangle( 0, 0, 15, 7 );
                gc.drawRectangle( 0, 0, 7, 15 );
                gc.drawRectangle( 0, 0, 15, 15 );
                c.dispose();
               
                ImageData clone = (ImageData) swtImage.getImageData().clone();               
View Full Code Here

                c.dispose();
               
                gc.setForeground( c = color( Color.BLACK ) );
                gc.drawRectangle( 0, 0, 7, 7 );
                gc.drawRectangle( 0, 0, 15, 7 );
                gc.drawRectangle( 0, 0, 7, 15 );
                gc.drawRectangle( 0, 0, 15, 15 );
                c.dispose();
               
                ImageData clone = (ImageData) swtImage.getImageData().clone();               
                swtImage.dispose();
View Full Code Here

               
                gc.setForeground( c = color( Color.BLACK ) );
                gc.drawRectangle( 0, 0, 7, 7 );
                gc.drawRectangle( 0, 0, 15, 7 );
                gc.drawRectangle( 0, 0, 7, 15 );
                gc.drawRectangle( 0, 0, 15, 15 );
                c.dispose();
               
                ImageData clone = (ImageData) swtImage.getImageData().clone();               
                swtImage.dispose();
               
View Full Code Here

                green, blue);

        GC gc = new GC(newImage);
        try {
            gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
            gc.drawRectangle(0, 0, bounds.width - 1, bounds.height - 1);
            int alpha = awtColor.getAlpha();
            gc.setAlpha(alpha);
            gc.setBackground(color2);
            gc.fillRectangle(1, 1, bounds.width - 2, bounds.height - 2);
        } finally {
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

          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

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.