Java Code Examples for org.jfree.chart.plot.DrawingSupplier#getNextPaint()
The following examples show how to use
org.jfree.chart.plot.DrawingSupplier#getNextPaint() .
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 |
/** * Returns the paint used to color an item drawn by the renderer. * * @param series the series index (zero-based). * * @return The paint (never <code>null</code>). * * @since 1.0.6 */ public Paint lookupSeriesPaint(int series) { // 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; }
Example 2
Source File: ProjectionPlotRenderer.java From mzmine3 with GNU General Public License v2.0 | 6 votes |
public ProjectionPlotRenderer(XYPlot plot, ProjectionPlotDataset dataset) { super(false, true); this.dataset = dataset; this.setSeriesShape(0, dataPointsShape); paintsForGroups = new Paint[dataset.getNumberOfGroups()]; DrawingSupplier drawSupp = plot.getDrawingSupplier(); for (int groupNumber = 0; groupNumber < dataset.getNumberOfGroups(); groupNumber++) { Paint nextPaint = drawSupp.getNextPaint(); while (isAvoidColor((Color) nextPaint)) nextPaint = drawSupp.getNextPaint(); paintsForGroups[groupNumber] = nextPaint; } }
Example 3
Source File: AbstractRenderer.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Returns the paint used to color an item drawn by the renderer. * * @param series the series index (zero-based). * * @return The paint (never <code>null</code>). * * @since 1.0.6 */ public Paint lookupSeriesPaint(int series) { // 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; }
Example 4
Source File: AbstractRenderer.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Returns the paint used to color an item drawn by the renderer. * * @param series the series index (zero-based). * * @return The paint (never <code>null</code>). * * @since 1.0.6 */ public Paint lookupSeriesPaint(int series) { // 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; }
Example 5
Source File: ProjectionPlotRenderer.java From mzmine2 with GNU General Public License v2.0 | 6 votes |
public ProjectionPlotRenderer(XYPlot plot, ProjectionPlotDataset dataset) { super(false, true); this.dataset = dataset; this.setSeriesShape(0, dataPointsShape); paintsForGroups = new Paint[dataset.getNumberOfGroups()]; DrawingSupplier drawSupp = plot.getDrawingSupplier(); for (int groupNumber = 0; groupNumber < dataset.getNumberOfGroups(); groupNumber++) { Paint nextPaint = drawSupp.getNextPaint(); while (isAvoidColor((Color) nextPaint)) nextPaint = drawSupp.getNextPaint(); paintsForGroups[groupNumber] = nextPaint; } }
Example 6
Source File: AbstractRenderer.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Returns the paint used to color an item drawn by the renderer. * * @param series the series index (zero-based). * * @return The paint (never <code>null</code>). * * @since 1.0.6 */ public Paint lookupSeriesPaint(int series) { // 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; }
Example 7
Source File: AbstractRenderer.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Returns the paint used to fill an item drawn by the renderer. * * @param series the series index (zero-based). * * @return The paint (never <code>null</code>). * * @since 1.0.6 */ public Paint lookupSeriesPaint(int series) { // 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; }
Example 8
Source File: AbstractRenderer.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Returns the paint used to fill an item drawn by the renderer. * * @param series the series index (zero-based). * * @return The paint (never <code>null</code>). * * @since 1.0.6 */ public Paint lookupSeriesPaint(int series) { // 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; }
Example 9
Source File: AbstractRenderer.java From opensim-gui with Apache License 2.0 | 6 votes |
/** * Returns the paint used to fill an item drawn by the renderer. * * @param series the series index (zero-based). * * @return The paint (never <code>null</code>). */ public Paint getSeriesPaint(int series) { // return the override, if there is one... if (this.paint != null) { return this.paint; } // otherwise look up the paint list Paint seriesPaint = this.paintList.getPaint(series); if (seriesPaint == null) { DrawingSupplier supplier = getDrawingSupplier(); if (supplier != null) { seriesPaint = supplier.getNextPaint(); this.paintList.setPaint(series, seriesPaint); } else { seriesPaint = this.basePaint; } } return seriesPaint; }
Example 10
Source File: AbstractRenderer.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Returns the paint used to color an item drawn by the renderer. * * @param series the series index (zero-based). * * @return The paint (never <code>null</code>). * * @since 1.0.6 */ public Paint lookupSeriesPaint(int series) { // 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; }
Example 11
Source File: AbstractRenderer.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Returns the paint used to color an item drawn by the renderer. * * @param series the series index (zero-based). * * @return The paint (never <code>null</code>). * * @since 1.0.6 */ public Paint lookupSeriesPaint(int series) { // 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; }