Example usage for org.jfree.chart.plot DrawingSupplier getNextFillPaint

List of usage examples for org.jfree.chart.plot DrawingSupplier getNextFillPaint

Introduction

In this page you can find the example usage for org.jfree.chart.plot DrawingSupplier getNextFillPaint.

Prototype

public Paint getNextFillPaint();

Source Link

Document

Returns the next fill paint in a sequence maintained by the supplier.

Usage

From source file:KIDLYAbstractRenderer.java

/**
 * Returns the paint used to fill an item drawn by the renderer.
 *
 * @param series  the series (zero-based index).
 *
 * @return The paint (never <code>null</code>).
 *
 * @since 1.0.6/*  w  ww.  j  a va2  s .co  m*/
 */
public Paint lookupSeriesFillPaint(int series) {

    // return the override, if there is one...
    if (this.fillPaint != null) {
        return this.fillPaint;
    }

    // otherwise look up the paint table
    Paint seriesFillPaint = getSeriesFillPaint(series);
    if (seriesFillPaint == null && this.autoPopulateSeriesFillPaint) {
        DrawingSupplier supplier = getDrawingSupplier();
        if (supplier != null) {
            seriesFillPaint = supplier.getNextFillPaint();
            setSeriesFillPaint(series, seriesFillPaint, false);
        }
    }
    if (seriesFillPaint == null) {
        seriesFillPaint = this.baseFillPaint;
    }
    return seriesFillPaint;

}