Package org.eclipse.swt.graphics

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


        Color clr = scheme.getColour(index);
        swtColour = new org.eclipse.swt.graphics.Color(composite.getDisplay(), new RGB(clr.getRed(),
                clr.getGreen(), clr.getBlue()));
        gc.setBackground(swtColour);
        gc.fillRectangle(0, 2, fExtent.x, fExtent.y);
        gc.dispose();
        colourIndicatorButton.setImage(image);
    }

    /**
 
View Full Code Here


            Image image = new Image(composite.getDisplay(), fExtent.x, fExtent.y);
            images.add(image);

            GC gc = new GC(image);
            gc.setBackground(swtColour);
            gc.fillRectangle(0, 0, fExtent.x, fExtent.y);
            gc.dispose();
            // Button b = new Button(image);
            // b.setStyle(STYLE_TOGGLE);
            b.setImage(image);
View Full Code Here

            previewImage = null;
            return;
        }
        Rectangle clientArea = previewCanvas.getClientArea();
        gc.setBackground(white);
        gc.fillRectangle(clientArea);

        List<FeatureTypeStyleWrapper> featureTypeStylesWrapperList = styleWrapper.getFeatureTypeStylesWrapperList();
        for( FeatureTypeStyleWrapper featureTypeStyleWrapper : featureTypeStylesWrapperList ) {
            List<RuleWrapper> rulesWrapperList = featureTypeStyleWrapper.getRulesWrapperList();
            BufferedImage tmpImage = Utilities.rulesWrapperToImage(rulesWrapperList, PREVIEWWIDTH, PREVIEWHEIGHT, type);
View Full Code Here

                   
                    org.eclipse.swt.graphics.Color c = getColor(display, entry.getColor());
                   
                    gc.setAlpha(getAlpha(entry.getOpacity()));
                    gc.setBackground( c );
                    gc.fillRectangle( 1, 1, imageSize.width-2, imageSize.height-2);
                    c.dispose();
                   
                    gc.setAlpha(150);
                    gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
                    gc.drawRectangle(1, 1, imageSize.width - 2, imageSize.height-2);
View Full Code Here

                    gc.setAntialias(SWT.ON);
                    org.eclipse.swt.graphics.Color c = getColor(display, entry.getColor());

                    gc.setAlpha(getAlpha(entry.getOpacity()));
                    gc.setBackground( c );
                    gc.fillRectangle( 1, 1, imageSize.width-2, imageSize.height-2);
                   
                    gc.setAlpha(150);
                    gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
                    gc.drawRectangle(1, 1, imageSize.width - 2, imageSize.height-2);
                   
View Full Code Here

            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 {
            gc.dispose();
            color2.dispose();
        }
        label.setImage(newImage);
View Full Code Here

        fExtent = computeImageSize(parent);
        fImage = new Image(parent.getDisplay(), fExtent.x, fExtent.y);

        GC gc = new GC(fImage);
        gc.setBackground(fButton.getBackground());
        gc.fillRectangle(0, 0, fExtent.x, fExtent.y);
        gc.dispose();

        fButton.setImage(fImage);
        fButton.addSelectionListener(new SelectionAdapter(){
            public void widgetSelected( SelectionEvent event ) {
View Full Code Here

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

        fColor = new Color(display, fColorValue);
        gc.setBackground(fColor);
        gc.fillRectangle(1, 3, fExtent.x - 2, fExtent.y - 5);
        gc.dispose();

        fButton.setImage(fImage);
    }
View Full Code Here

                    f = Color.LIGHT_GRAY;
                }
                if( f != null ){
                    gc.setBackground( color( f ) );
                    gc.setAlpha(f.getAlpha());
                    gc.fillRectangle( 8,7, 5, 5 );
                }
                if( c != null ){
                    gc.setForeground( color( c ) );
                    gc.setAlpha(c.getAlpha());
                    gc.drawRectangle( 8,7, 5, 5 );
View Full Code Here

                GC gc = new GC(swtImage);
                gc.setAntialias(SWT.ON);
                org.eclipse.swt.graphics.Color c = null;
               
                gc.setBackground( c = color( finalA ) );
                gc.fillRectangle( 0, 0, 7, 7);
                c.dispose();
               
                gc.setBackground( c = color( finalB ));
                gc.fillRectangle( 7, 0, 15, 7 );
                c.dispose();
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.