Example usage for org.jfree.chart.plot CategoryPlot setBackgroundImage

List of usage examples for org.jfree.chart.plot CategoryPlot setBackgroundImage

Introduction

In this page you can find the example usage for org.jfree.chart.plot CategoryPlot setBackgroundImage.

Prototype

public void setBackgroundImage(Image image) 

Source Link

Document

Sets the background image for the plot and sends a PlotChangeEvent to all registered listeners.

Usage

From source file:org.openmicroscopy.shoola.util.ui.graphutils.BarPlot.java

/** 
 * Creates the chart.//w w  w  . ja v a 2  s .co m
 * @see ChartObject#createChar()
 */
void createChart() {
    CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, rangeAxis, new CustomBarRenderer(colours));
    if (backgroundImage != null) {
        plot.setRangeGridlinesVisible(false);
        plot.setDomainGridlinesVisible(false);
        plot.setBackgroundImage(backgroundImage);
    }
    chart = new JFreeChart(title, plot);
}