Java Code Examples for org.jfree.chart.plot.DrawingSupplier#getNextStroke()

The following examples show how to use org.jfree.chart.plot.DrawingSupplier#getNextStroke() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractRenderer.java    From openstock with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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
 */
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;

}
 
Example 2
Source File: AbstractRenderer.java    From ccu-historian with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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
 */
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;

}
 
Example 3
Source File: AbstractRenderer.java    From SIMVA-SoS with Apache License 2.0 6 votes vote down vote up
/**
 * 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
 */
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;

}
 
Example 4
Source File: AbstractRenderer.java    From ECG-Viewer with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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
 */
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;

}
 
Example 5
Source File: AbstractRenderer.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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
 */
public Stroke lookupSeriesStroke(int series) {

    // 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;

}
 
Example 6
Source File: AbstractRenderer.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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
 */
public Stroke lookupSeriesStroke(int series) {

    // 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;

}
 
Example 7
Source File: AbstractRenderer.java    From opensim-gui with Apache License 2.0 6 votes vote down vote up
/**
 * 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>).
 */
public Stroke getSeriesStroke(int series) {

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

    // otherwise look up the paint table
    Stroke result = this.strokeList.getStroke(series);
    if (result == null) {
        DrawingSupplier supplier = getDrawingSupplier();
        if (supplier != null) {
            result = supplier.getNextStroke();
            this.strokeList.setStroke(series, result);
        }
        else {
            result = this.baseStroke;
        }
    }
    return result;

}
 
Example 8
Source File: AbstractRenderer.java    From buffer_bci with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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
 */
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;

}
 
Example 9
Source File: AbstractRenderer.java    From buffer_bci with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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
 */
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;

}