Package java.awt

Examples of java.awt.RadialGradientPaint


                    Color color = decodeColor(JSONSerializer.getString(stop, COLOR_KEY));
                    colors[i] = color;
                }

                paint = new RadialGradientPaint(centerX, centerY, radius, fractions, colors);
                break;
            }

            default: {
                throw new UnsupportedOperationException();
View Full Code Here


        frame.add(panel);
        frame.setSize(800,600);
        frame.setVisible(true);
         */
       
        RadialGradientPaint rp = new RadialGradientPaint(new Point2D.Double(0.5,0.5),
                .2f, new float[] {0f, .5f, 1f},
                new Color[] {Color.BLACK, Color.WHITE, Color.RED}
        );
        baos = new ByteArrayOutputStream(300);
        e = new XMLEncoder(baos);
View Full Code Here

        if(grad instanceof LinearGradientPaint) {
            LinearGradientPaint paint = (LinearGradientPaint)grad;
            this.start = paint.getStartPoint();
            this.end = paint.getEndPoint();
        } else {
            RadialGradientPaint paint = (RadialGradientPaint)grad;
            this.start = paint.getCenterPoint();
            this.end = new Point2D.Double(start.getX(),start.getY()+paint.getRadius());
        }
        this.gradient = grad;
        firePropertyChange("gradient", old, getGradient());
        repaint();
    }
View Full Code Here

        }
       
        // create the underlying gradient paint
        MultipleGradientPaint paint = null;
        if(isRadial()) { //picker.styleCombo.getSelectedItem().toString().equals("Radial")) {
            paint = new RadialGradientPaint(
            start, (float)start.distance(end),start,
            fractions, colors, cycle, MultipleGradientPaint.ColorSpaceType.SRGB, null
            );
        } else {
            paint = new LinearGradientPaint(
View Full Code Here

        Ellipse2D buttonBackgroundCircle = new Ellipse2D.Double(1, 1,
            BUTTON_DIAMETER - 3, BUTTON_DIAMETER - 3);

        if (radioButton.isEnabled()) {
            buttonPaint = new RadialGradientPaint((float)buttonBackgroundCircle.getCenterX(),
                (float)buttonBackgroundCircle.getCenterY(),
                (float)buttonBackgroundCircle.getWidth() * 2 / 3,
                new float[] {0f, 1f}, new Color[] {TerraTheme.darken(buttonColor), buttonColor});
            buttonBorderColor = this.buttonBorderColor;
            buttonSelectionColor = this.buttonSelectionColor;
View Full Code Here

                transparent ? new Color(255, 255, 255, 128) : Color.WHITE,
                transparent ? new Color(0, 255, 255, 32) : Color.CYAN };
       
        float[] fractions = new float[] { 0f, 1f };
       
        RadialGradientPaint paint = new RadialGradientPaint(center, radius,
                focus, fractions, colors,
                MultipleGradientPaint.CycleMethod.NO_CYCLE);
       
        return paint;
    }
View Full Code Here

        PiePlot plot = (PiePlot) chart.getPlot();
        plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0} ({2})"));
        plot.setBackgroundPaint(Color.WHITE);
        plot.setOutlinePaint(null);

        RadialGradientPaint p = new RadialGradientPaint(
                new Point2D.Float(0, 0),
                100,
                new float[] {0.1f, 0.4f, 1},
                new Color[] {Color.BLUE, Color.red, Color.yellow},
                CycleMethod.REFLECT);
View Full Code Here

           
            i += 1;
           
            event.setExplodedSegmentPie("Point 2", 0.3);
           
            RadialGradientPaint p1 = new RadialGradientPaint(
                    new Point2D.Float(0, 0),
                    80,
                    new float[] {0.3f, 1},
                    new Color[] {Color.red, Color.yellow},
                    CycleMethod.REFLECT);
View Full Code Here

        Ellipse2D buttonBackgroundCircle = new Ellipse2D.Double(1, 1,
            BUTTON_DIAMETER - 3, BUTTON_DIAMETER - 3);

        if (enabled) {
            buttonPaint = new RadialGradientPaint((float)buttonBackgroundCircle.getCenterX(),
                (float)buttonBackgroundCircle.getCenterY(),
                (float)buttonBackgroundCircle.getWidth() * 2 / 3,
                new float[] {0f, 1f}, new Color[] {TerraTheme.darken(buttonColor), buttonColor});

            buttonBorderColorLocal = this.buttonBorderColor;
View Full Code Here

                    Color color = decodeColor((String)JSON.get(stop, COLOR_KEY));
                    colors[i] = color;
                }

                paint = new RadialGradientPaint(centerX, centerY, radius, fractions, colors);
                break;
            }

            default: {
                throw new UnsupportedOperationException();
View Full Code Here

TOP

Related Classes of java.awt.RadialGradientPaint

Copyright © 2018 www.massapicom. 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.