Logo Search packages:      
Sourcecode: libjfreechart-java version File versions  Download package

Paint org::jfree::chart::renderer::AbstractRenderer::lookupSeriesPaint ( int  series  )  [inline, inherited]

Returns the paint used to fill an item drawn by the renderer.

Parameters:
series the series index (zero-based).
Returns:
The paint (never null).
Since:
1.0.6

Definition at line 885 of file AbstractRenderer.java.

References org::jfree::chart::renderer::AbstractRenderer::autoPopulateSeriesPaint, org::jfree::chart::renderer::AbstractRenderer::basePaint, org::jfree::chart::renderer::AbstractRenderer::getDrawingSupplier(), org::jfree::chart::plot::DrawingSupplier::getNextPaint(), org::jfree::chart::renderer::AbstractRenderer::getSeriesPaint(), org::jfree::chart::renderer::AbstractRenderer::paint, and org::jfree::chart::renderer::AbstractRenderer::setSeriesPaint().

Referenced by org::jfree::chart::renderer::xy::StandardXYItemRenderer::drawItem(), org::jfree::chart::renderer::DefaultPolarItemRenderer::drawSeries(), org::jfree::chart::renderer::AbstractRenderer::getItemPaint(), org::jfree::chart::renderer::xy::XYLineAndShapeRenderer::getLegendItem(), org::jfree::chart::renderer::xy::XYDotRenderer::getLegendItem(), org::jfree::chart::renderer::xy::XYDifferenceRenderer::getLegendItem(), org::jfree::chart::renderer::xy::XYBubbleRenderer::getLegendItem(), org::jfree::chart::renderer::xy::XYBarRenderer::getLegendItem(), org::jfree::chart::renderer::xy::XYAreaRenderer2::getLegendItem(), org::jfree::chart::renderer::xy::XYAreaRenderer::getLegendItem(), org::jfree::chart::renderer::xy::StandardXYItemRenderer::getLegendItem(), org::jfree::chart::renderer::xy::AbstractXYItemRenderer::getLegendItem(), org::jfree::chart::renderer::DefaultPolarItemRenderer::getLegendItem(), org::jfree::chart::renderer::category::ScatterRenderer::getLegendItem(), org::jfree::chart::renderer::category::LineAndShapeRenderer::getLegendItem(), org::jfree::chart::renderer::category::CategoryStepRenderer::getLegendItem(), org::jfree::chart::renderer::category::BoxAndWhiskerRenderer::getLegendItem(), org::jfree::chart::renderer::category::BarRenderer::getLegendItem(), org::jfree::chart::renderer::category::AreaRenderer::getLegendItem(), org::jfree::chart::renderer::category::AbstractCategoryItemRenderer::getLegendItem(), and org::jfree::chart::renderer::junit::AbstractRendererTests::testPaintLookup().

                                               {

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

        // otherwise look up the paint list
        Paint seriesPaint = getSeriesPaint(series);
        if (seriesPaint == null && this.autoPopulateSeriesPaint) {
            DrawingSupplier supplier = getDrawingSupplier();
            if (supplier != null) {
                seriesPaint = supplier.getNextPaint();
                setSeriesPaint(series, seriesPaint, false);
            }
        }
        if (seriesPaint == null) {
            seriesPaint = this.basePaint;
        }
        return seriesPaint;

    }


Generated by  Doxygen 1.6.0   Back to index