org.jfree.chart.renderer.xy.XYShapeRenderer Java Examples
The following examples show how to use
org.jfree.chart.renderer.xy.XYShapeRenderer.
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: XYShapeRendererTests.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Some checks for the equals() method. */ public void testEquals() { XYShapeRenderer r1 = new XYShapeRenderer(); XYShapeRenderer r2 = new XYShapeRenderer(); assertTrue(r1.equals(r2)); assertTrue(r2.equals(r1)); r1.setPaintScale(new LookupPaintScale(1.0, 2.0, Color.white)); assertFalse(r1.equals(r2)); r2.setPaintScale(new LookupPaintScale(1.0, 2.0, Color.white)); assertTrue(r1.equals(r2)); r1.setDrawOutlines(true); assertFalse(r1.equals(r2)); r2.setDrawOutlines(true); assertTrue(r1.equals(r2)); r1.setUseOutlinePaint(false); assertFalse(r1.equals(r2)); r2.setUseOutlinePaint(false); assertTrue(r1.equals(r2)); r1.setUseFillPaint(true); assertFalse(r1.equals(r2)); r2.setUseFillPaint(true); assertTrue(r1.equals(r2)); r1.setGuideLinesVisible(true); assertFalse(r1.equals(r2)); r2.setGuideLinesVisible(true); assertTrue(r1.equals(r2)); r1.setGuideLinePaint(Color.red); assertFalse(r1.equals(r2)); r2.setGuideLinePaint(Color.red); assertTrue(r1.equals(r2)); }
Example #2
Source File: ChartJFreeChartOutputScatter.java From gama with GNU General Public License v3.0 | 4 votes |
protected void resetRenderer(final IScope scope, final String serieid) { final AbstractXYItemRenderer newr = (AbstractXYItemRenderer) this.getOrCreateRenderer(scope, serieid); // newr.setSeriesStroke(0, new BasicStroke(0)); newr.setDefaultCreateEntities(true); final ChartDataSeries myserie = this.getChartdataset().getDataSeries(scope, serieid); if (newr instanceof XYLineAndShapeRenderer) { ((XYLineAndShapeRenderer) newr).setSeriesLinesVisible(0, myserie.getMysource().showLine); ((XYLineAndShapeRenderer) newr).setSeriesShapesFilled(0, myserie.getMysource().fillMarker); ((XYLineAndShapeRenderer) newr).setSeriesShapesVisible(0, myserie.getMysource().useMarker); } if (newr instanceof XYShapeRenderer) { if (!myserie.getMysource().fillMarker) { ((XYShapeRenderer) newr).setUseFillPaint(false); // ((XYShapeRenderer) newr).setDrawOutlines(true); } } if (myserie.getMycolor() != null) { newr.setSeriesPaint(0, myserie.getMycolor()); } newr.setSeriesStroke(0, new BasicStroke((float) myserie.getLineThickness())); if (newr instanceof myXYErrorRenderer) { ((myXYErrorRenderer) newr).setDrawYError(false); ((myXYErrorRenderer) newr).setDrawXError(false); if (myserie.isUseYErrValues()) { ((myXYErrorRenderer) newr).setDrawYError(true); } if (myserie.isUseXErrValues()) { ((myXYErrorRenderer) newr).setDrawXError(true); } if (myserie.getMysource().isUseSize()) { ((myXYErrorRenderer) newr).setUseSize(scope, true); } } if (myserie.getMysource().getUniqueMarkerName() != null) { setSerieMarkerShape(scope, myserie.getName(), myserie.getMysource().getUniqueMarkerName()); } }