Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/jfree/StyledXYSeries.java @ 7541:d20a26e96ef1
issue1585: Part 1/2 of patch from Sascha Teichmann to define shape for datapoints.
Just a tiny fix done by me.
author | sascha.teichmann@intevation.de |
---|---|
date | Fri, 08 Nov 2013 11:57:37 +0100 |
parents | 1b35b2ddfc28 |
children | 4fe290eddb43 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/StyledXYSeries.java Fri Nov 08 10:38:37 2013 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/StyledXYSeries.java Fri Nov 08 11:57:37 2013 +0100 @@ -16,6 +16,8 @@ import org.jfree.data.xy.XYDataItem; import org.jfree.data.xy.XYSeries; +import java.awt.Shape; + /** * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ @@ -30,8 +32,7 @@ public StyledXYSeries(String key, ThemeDocument theme) { - this(key, true, theme); - this.label = key.toString(); + this(key, true, theme, (Shape)null); } @@ -40,31 +41,48 @@ add(unstyledSeries); } + public StyledXYSeries(String key, boolean sorted, ThemeDocument theme) { + this(key, sorted, theme, (Shape)null); + } + + + public StyledXYSeries(String key, ThemeDocument theme, Shape shape) { + this(key, true, theme, shape); + } /** * @param sorted whether or not to sort the points. Sorting will move NANs * to one extrema which can cause problems in certain * algorithms. */ - public StyledXYSeries(String key, boolean sorted, ThemeDocument theme) { + public StyledXYSeries(String key, boolean sorted, ThemeDocument theme, Shape shape) { super(key, sorted); - setStyle(new XYStyle(theme)); + setStyle(new XYStyle(theme, shape)); this.label = key.toString(); } public StyledXYSeries( - String key, - boolean sorted, - boolean allowDuplicateXValues, + String key, + boolean sorted, + boolean allowDuplicateXValues, ThemeDocument theme ) { + this(key, sorted, allowDuplicateXValues, theme, (Shape)null); + } + + public StyledXYSeries( + String key, + boolean sorted, + boolean allowDuplicateXValues, + ThemeDocument theme, + Shape shape + ) { super(key, sorted, allowDuplicateXValues); - setStyle(new XYStyle(theme)); + setStyle(new XYStyle(theme, shape)); this.label = key.toString(); } - @Override public void setStyle(Style style) { this.style = style;