Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/exports/process/FixWQProcessor.java @ 9325:094ed9d1f2ad
Fixed: change of point style of interpolated data did not change in WQ chart of fixanalysis
Fixed: change of point style of interpolated data did not change in dWt chart of fixanalysis; also had duplicate legend entries
author | gernotbelger |
---|---|
date | Fri, 27 Jul 2018 14:33:41 +0200 |
parents | 1cc7653ca84f |
children | a3f318347707 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/FixWQProcessor.java Fri Jul 27 14:32:14 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/FixWQProcessor.java Fri Jul 27 14:33:41 2018 +0200 @@ -30,6 +30,7 @@ import org.dive4elements.river.artifacts.resources.Resources; import org.dive4elements.river.exports.DiagramGenerator; import org.dive4elements.river.exports.StyledSeriesBuilder; +import org.dive4elements.river.exports.fixings.FixWQCurveGenerator; import org.dive4elements.river.java2d.ShapeUtils; import org.dive4elements.river.jfree.CollisionFreeXYTextAnnotation; import org.dive4elements.river.jfree.JFreeUtil; @@ -161,15 +162,12 @@ return; } - // Force empty symbol. - if (qwd.getInterpolated()) { - theme = new ThemeDocument(theme); // prevent potential side effects - theme.setValue(ThemeDocument.USE_FILL_PAINT, "true"); - } + // prevent potential side effects + final ThemeDocument themeInterpolated = FixWQCurveGenerator.configureThemeInterpolated(theme, qwd); XYSeries series = new StyledXYSeries( bundle.getFacetDescription(), - theme, + themeInterpolated, qwd.getInterpolated() ? ShapeUtils.INTERPOLATED_SHAPE : ShapeUtils.MEASURED_SHAPE); @@ -178,7 +176,7 @@ generator.addAxisSeries(series, axisName, visible); - if (visible && theme.parseShowPointLabel()) { + if (visible && themeInterpolated.parseShowPointLabel()) { List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>(); @@ -192,7 +190,7 @@ textAnnos.add(anno); RiverAnnotation flysAnno = - new RiverAnnotation(null, null, null, theme); + new RiverAnnotation(null, null, null, themeInterpolated); flysAnno.setTextAnnotations(textAnnos); generator.addAnnotations(flysAnno); } @@ -213,22 +211,18 @@ return; } - // Force empty symbol. - if (qwd.getInterpolated()) { - theme = new ThemeDocument(theme); // prevent potential side effects - theme.setValue(ThemeDocument.USE_FILL_PAINT, "true"); - } + final ThemeDocument themeInterpolated = FixWQCurveGenerator.configureThemeInterpolated(theme, qwd); XYSeries series = new StyledXYSeries( bundle.getFacetDescription(), - false, true, theme, + false, true, themeInterpolated, qwd.getInterpolated() ? ShapeUtils.INTERPOLATED_SHAPE : ShapeUtils.MEASURED_SHAPE); series.add(qwd.getQ(), qwd.getW(), false); - if (visible && theme.parseShowPointLabel()) { + if (visible && themeInterpolated.parseShowPointLabel()) { DateFormat dateFormat = DateFormat.getDateInstance( DateFormat.SHORT); @@ -241,7 +235,7 @@ new ArrayList<XYTextAnnotation>(); textAnnos.add(anno); RiverAnnotation flysAnno = - new RiverAnnotation(null, null, null, theme); + new RiverAnnotation(null, null, null, themeInterpolated); flysAnno.setTextAnnotations(textAnnos); generator.addAnnotations(flysAnno); }