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

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

Introduction

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

Prototype

public Stroke getNextStroke();

Source Link

Document

Returns the next Stroke object in a sequence maintained by the supplier.

Usage

From source file:KIDLYAbstractRenderer.java

/**
 * Returns the stroke used to draw the items in a series.
 *
 * @param series  the series (zero-based index).
 *
 * @return The stroke (never <code>null</code>).
 *
 * @since 1.0.6//w  w  w .  jav  a 2s  .co  m
 */
public Stroke lookupSeriesStroke(int series) {

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

    // otherwise look up the paint table
    Stroke result = getSeriesStroke(series);
    if (result == null && this.autoPopulateSeriesStroke) {
        DrawingSupplier supplier = getDrawingSupplier();
        if (supplier != null) {
            result = supplier.getNextStroke();
            setSeriesStroke(series, result, false);
        }
    }
    if (result == null) {
        result = this.baseStroke;
    }
    return result;

}