Package org.jfree.chart.drawable

Examples of org.jfree.chart.drawable.ColorPainter


     * Creates a new plot.
     */
    protected Plot() {
        this.parent = null;
        this.insets = DEFAULT_INSETS;
        this.backgroundPainter = new ColorPainter(Color.WHITE);
        this.backgroundAlpha = DEFAULT_BACKGROUND_ALPHA;
        this.backgroundImage = null;
        this.borderPainter = new BorderPainter(Color.GRAY,
                DEFAULT_OUTLINE_STROKE);
        this.foregroundAlpha = DEFAULT_FOREGROUND_ALPHA;
View Full Code Here


        fireChangeEvent();
    }
   
    public void setBackgroundColor(Color color) {
        if (color != null) {
            setBackgroundPainter(new ColorPainter(color));
        } else {
            setBackgroundPainter(null);
        }
    }
View Full Code Here

        JFreeChart chart = ChartFactory.createTimeSeriesChart(
                "Legal & General Unit Trust Prices",
                "Date", "Price Per Unit",
                dataset);

        chart.setBackgroundPainter(new ColorPainter(Color.WHITE));

        XYPlot plot = (XYPlot) chart.getPlot();
        plot.setDomainGridlinePaint(Color.LIGHT_GRAY);
        plot.setRangeGridlinePaint(Color.LIGHT_GRAY);
        plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
View Full Code Here

        StandardChartTheme theme = new StandardChartTheme("Darkness");
        theme.titlePaint = Color.WHITE;
        theme.subtitlePaint = Color.WHITE;
        theme.legendBackgroundPaint = Color.BLACK;
        theme.legendItemPaint = Color.WHITE;
        theme.chartBackgroundPainter = new ColorPainter(Color.BLACK);
        theme.plotBackgroundPainter = new ColorPainter(Color.BLACK);
        theme.plotBorderPainter = new BorderPainter(Color.YELLOW, new BasicStroke(1.0f));
        theme.axisLabelPaint = Color.WHITE;
        theme.shadowPaint = Color.DARK_GRAY;
        theme.itemLabelPaint = Color.WHITE;
        theme.drawingSupplier = new DefaultDrawingSupplier(
View Full Code Here

        this.smallFont = createDefaultFont(Font.PLAIN, 10);
        this.titlePaint = Color.BLACK;
        this.subtitlePaint = Color.BLACK;
        this.legendBackgroundPaint = Color.WHITE;
        this.legendItemPaint = Color.DARK_GRAY;
        this.chartBackgroundPainter = new ColorPainter(Color.WHITE);
        this.drawingSupplier = new DefaultDrawingSupplier();
        this.plotBackgroundPainter = new ColorPainter(Color.WHITE);
        this.plotBorderPainter = null;
        this.labelLinkPaint = Color.BLACK;
        this.labelLinkStyle = PieLabelLinkStyle.CUBIC_CURVE;
        this.axisOffset = new RectangleInsets(4, 4, 4, 4);
        this.domainGridlinePaint = Color.WHITE;
View Full Code Here

        // http://stackoverflow.com/questions/7785082/
        this.renderingHints.put(RenderingHints.KEY_STROKE_CONTROL,
                RenderingHints.VALUE_STROKE_PURE);

        this.borderPainter = null;
        this.backgroundPainter = new ColorPainter();
        this.padding = new RectangleInsets(4, 4, 4, 4);
        this.plot = plot;
        plot.addChangeListener(this);

        this.subtitles = new ArrayList<Title>();
View Full Code Here

        this.titleEditor.setTitleProperties(chart);
        this.plotEditor.updatePlotProperties(chart.getPlot());

        chart.setAntiAlias(getAntiAlias());
        chart.setBackgroundPainter(new ColorPainter((Color) getBackgroundPaint()));
    }
View Full Code Here

        chart2 = new JFreeChart("Title",
                new Font("SansSerif", Font.PLAIN, 12), new RingPlot(), false);
        assertEquals(chart1, chart2);

        // backgroundPaint
        chart1.setBackgroundPainter(new ColorPainter(Color.RED));
        assertFalse(chart1.equals(chart2));
        chart2.setBackgroundPainter(new ColorPainter(Color.RED));
        assertEquals(chart1, chart2);

        // backgroundImage
        chart1.setBackgroundImage(getTestImage());
        assertFalse(chart1.equals(chart2));
View Full Code Here

        t2.setSubtitlePaint(new GradientPaint(1f, 2f, Color.RED, 3f, 4f,
                Color.BLUE));
        assertEquals(t1, t2);

        //chartBackgroundPaint;
        t1.setChartBackgroundPainter(new ColorPainter(Color.RED));
        assertFalse(t1.equals(t2));
        t2.setChartBackgroundPainter(new ColorPainter(Color.RED));
        assertEquals(t1, t2);

        //legendBackgroundPaint;
        t1.setLegendBackgroundPaint(new GradientPaint(3f, 4f, Color.gray,
                1f, 2f, Color.RED));
        assertFalse(t1.equals(t2));
        t2.setLegendBackgroundPaint(new GradientPaint(3f, 4f, Color.gray,
                1f, 2f, Color.RED));
        assertEquals(t1, t2);

        //legendItemPaint;
        t1.setLegendItemPaint(new GradientPaint(9f, 8f, Color.RED, 7f, 6f,
                Color.BLUE));
        assertFalse(t1.equals(t2));
        t2.setLegendItemPaint(new GradientPaint(9f, 8f, Color.RED, 7f, 6f,
                Color.BLUE));
        assertEquals(t1, t2);

        //drawingSupplier;
        t1.setDrawingSupplier(new DefaultDrawingSupplier(
                new Paint[] {Color.RED},
                new Paint[] {Color.BLUE},
                new Stroke[] {new BasicStroke(1.0f)},
                new Stroke[] {new BasicStroke(1.0f)},
                new Shape[] {new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0)}));
        assertFalse(t1.equals(t2));
        t2.setDrawingSupplier(new DefaultDrawingSupplier(
                new Paint[] {Color.RED},
                new Paint[] {Color.BLUE},
                new Stroke[] {new BasicStroke(1.0f)},
                new Stroke[] {new BasicStroke(1.0f)},
                new Shape[] {new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0)}));
        assertEquals(t1, t2);

        //plotBackgroundPainter;
        t1.setPlotBackgroundPainter(new ColorPainter(Color.RED));
        assertFalse(t1.equals(t2));
        t2.setPlotBackgroundPainter(new ColorPainter(Color.RED));
        assertEquals(t1, t2);

        //plotOutlinePaint;
        t1.setPlotBorderPainter(new BorderPainter(Color.RED,
                new BasicStroke(1.0f)));
View Full Code Here

        assertFalse(plot1.equals(plot2));
        plot2.setBorderPainter(new BorderPainter(Color.RED, new BasicStroke(1.0f)));
        assertEquals(plot1, plot2);

        // backgroundPainter
        plot1.setBackgroundPainter(new ColorPainter(Color.RED));
        assertFalse(plot1.equals(plot2));
        plot2.setBackgroundPainter(new ColorPainter(Color.RED));
        assertEquals(plot1, plot2);

        // backgroundImage
        plot1.setBackgroundImage(getTestImage());
        assertFalse(plot1.equals(plot2));
View Full Code Here

TOP

Related Classes of org.jfree.chart.drawable.ColorPainter

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.