Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/jfree/XYStyle.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 | 2d690611d110 |
children | 4dbbdf0c8b2c |
rev | line source |
---|---|
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
2 * Software engineering by Intevation GmbH |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
3 * |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
7 */ |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
8 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3464
diff
changeset
|
9 package org.dive4elements.river.jfree; |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
11 import org.dive4elements.river.themes.ThemeDocument; |
3464
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
12 |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 import java.awt.BasicStroke; |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import java.awt.Color; |
7541
d20a26e96ef1
issue1585: Part 1/2 of patch from Sascha Teichmann to define shape for datapoints.
sascha.teichmann@intevation.de
parents:
7156
diff
changeset
|
15 import java.awt.Shape; |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 import java.awt.geom.Ellipse2D; |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 |
3155
74c974b10c75
Output code to trackdown the linecolor problem
Christian Lins <christian.lins@intevation.de>
parents:
3134
diff
changeset
|
18 import org.apache.log4j.Logger; |
3464
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
19 import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 /** |
2648
8aaa7f4ce06a
Let theme define whether or not to display a (yet static) label for line).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2321
diff
changeset
|
23 * Utility to apply theme-settings to a renderer. |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 */ |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 public class XYStyle implements Style { |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 |
3155
74c974b10c75
Output code to trackdown the linecolor problem
Christian Lins <christian.lins@intevation.de>
parents:
3134
diff
changeset
|
28 private static Logger logger = Logger.getLogger(XYStyle.class); |
74c974b10c75
Output code to trackdown the linecolor problem
Christian Lins <christian.lins@intevation.de>
parents:
3134
diff
changeset
|
29 |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
30 protected ThemeDocument theme; |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 |
3134
5a0aef74c316
Use different stylings for real and interpolated data points.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3090
diff
changeset
|
32 protected XYLineAndShapeRenderer renderer; |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 |
7541
d20a26e96ef1
issue1585: Part 1/2 of patch from Sascha Teichmann to define shape for datapoints.
sascha.teichmann@intevation.de
parents:
7156
diff
changeset
|
34 protected Shape shape; |
d20a26e96ef1
issue1585: Part 1/2 of patch from Sascha Teichmann to define shape for datapoints.
sascha.teichmann@intevation.de
parents:
7156
diff
changeset
|
35 |
3155
74c974b10c75
Output code to trackdown the linecolor problem
Christian Lins <christian.lins@intevation.de>
parents:
3134
diff
changeset
|
36 |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
37 public XYStyle(ThemeDocument theme) { |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 this.theme = theme; |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 } |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 |
7541
d20a26e96ef1
issue1585: Part 1/2 of patch from Sascha Teichmann to define shape for datapoints.
sascha.teichmann@intevation.de
parents:
7156
diff
changeset
|
41 public XYStyle(ThemeDocument theme, Shape shape) { |
d20a26e96ef1
issue1585: Part 1/2 of patch from Sascha Teichmann to define shape for datapoints.
sascha.teichmann@intevation.de
parents:
7156
diff
changeset
|
42 this.theme = theme; |
d20a26e96ef1
issue1585: Part 1/2 of patch from Sascha Teichmann to define shape for datapoints.
sascha.teichmann@intevation.de
parents:
7156
diff
changeset
|
43 this.shape = shape; |
d20a26e96ef1
issue1585: Part 1/2 of patch from Sascha Teichmann to define shape for datapoints.
sascha.teichmann@intevation.de
parents:
7156
diff
changeset
|
44 } |
d20a26e96ef1
issue1585: Part 1/2 of patch from Sascha Teichmann to define shape for datapoints.
sascha.teichmann@intevation.de
parents:
7156
diff
changeset
|
45 |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 /** |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 * Applies line color, size and type attributes to renderer, also |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 * whether to draw lines and/or points. |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 */ |
3464
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
51 @Override |
7156
2d690611d110
Add NPE guard to XYStyle.
Andre Heinecke <aheinecke@intevation.de>
parents:
6905
diff
changeset
|
52 public XYLineAndShapeRenderer applyTheme(XYLineAndShapeRenderer r, int idx) { |
7541
d20a26e96ef1
issue1585: Part 1/2 of patch from Sascha Teichmann to define shape for datapoints.
sascha.teichmann@intevation.de
parents:
7156
diff
changeset
|
53 this.renderer = r; |
d20a26e96ef1
issue1585: Part 1/2 of patch from Sascha Teichmann to define shape for datapoints.
sascha.teichmann@intevation.de
parents:
7156
diff
changeset
|
54 if (shape != null) { |
d20a26e96ef1
issue1585: Part 1/2 of patch from Sascha Teichmann to define shape for datapoints.
sascha.teichmann@intevation.de
parents:
7156
diff
changeset
|
55 r.setShape(shape); |
d20a26e96ef1
issue1585: Part 1/2 of patch from Sascha Teichmann to define shape for datapoints.
sascha.teichmann@intevation.de
parents:
7156
diff
changeset
|
56 } |
7156
2d690611d110
Add NPE guard to XYStyle.
Andre Heinecke <aheinecke@intevation.de>
parents:
6905
diff
changeset
|
57 if (theme == null) { |
2d690611d110
Add NPE guard to XYStyle.
Andre Heinecke <aheinecke@intevation.de>
parents:
6905
diff
changeset
|
58 // Hurray we already applied nothing :) |
2d690611d110
Add NPE guard to XYStyle.
Andre Heinecke <aheinecke@intevation.de>
parents:
6905
diff
changeset
|
59 return r; |
2d690611d110
Add NPE guard to XYStyle.
Andre Heinecke <aheinecke@intevation.de>
parents:
6905
diff
changeset
|
60 } |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 applyLineColor(r, idx); |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 applyLineSize(r, idx); |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 applyLineType(r, idx); |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 applyShowLine(r, idx); |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 applyShowPoints(r, idx); |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 applyPointSize(r, idx); |
3090
22def36d37b7
Apply point color in XYStyle.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2662
diff
changeset
|
67 applyPointColor(r, idx); |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 applyShowMinimum(r, idx); |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 applyShowMaximum(r, idx); |
3464
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
70 |
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
71 // Line label styles |
2648
8aaa7f4ce06a
Let theme define whether or not to display a (yet static) label for line).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2321
diff
changeset
|
72 applyShowLineLabel(r, idx); |
3464
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
73 applyShowLineLabelBG(r, idx); |
2656
f1dcd5f94ffa
Parse more theme properties for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2648
diff
changeset
|
74 applyLineLabelFont(r, idx); |
2660
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
75 applyLineLabelColor(r, idx); |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
76 applyLineLabelBGColor(r, idx); |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 |
3464
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
78 // Point label styles |
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
79 // TODO: Currently point label are annotations and are not drawn this way |
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
80 /* |
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
81 applyShowPointLabelBG(r, idx); |
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
82 applyLinePointFont(r, idx); |
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
83 applyLinePointColor(r, idx); |
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
84 applyLinePointBGColor(r, idx);*/ |
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
85 |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 return r; |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 } |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 /** Set line color to renderer. */ |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 protected void applyLineColor(XYLineAndShapeRenderer r, int idx) { |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
92 Color c = theme.parseLineColorField(); |
3155
74c974b10c75
Output code to trackdown the linecolor problem
Christian Lins <christian.lins@intevation.de>
parents:
3134
diff
changeset
|
93 if(c != null) { |
74c974b10c75
Output code to trackdown the linecolor problem
Christian Lins <christian.lins@intevation.de>
parents:
3134
diff
changeset
|
94 logger.debug("applyLineColor " + c.toString()); |
74c974b10c75
Output code to trackdown the linecolor problem
Christian Lins <christian.lins@intevation.de>
parents:
3134
diff
changeset
|
95 r.setSeriesPaint(idx, c); |
74c974b10c75
Output code to trackdown the linecolor problem
Christian Lins <christian.lins@intevation.de>
parents:
3134
diff
changeset
|
96 } |
74c974b10c75
Output code to trackdown the linecolor problem
Christian Lins <christian.lins@intevation.de>
parents:
3134
diff
changeset
|
97 else { |
74c974b10c75
Output code to trackdown the linecolor problem
Christian Lins <christian.lins@intevation.de>
parents:
3134
diff
changeset
|
98 logger.warn("applyLineColor: color is null - malformed linecolor field?"); |
74c974b10c75
Output code to trackdown the linecolor problem
Christian Lins <christian.lins@intevation.de>
parents:
3134
diff
changeset
|
99 } |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 } |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 |
2648
8aaa7f4ce06a
Let theme define whether or not to display a (yet static) label for line).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2321
diff
changeset
|
103 /** Tells the renderer whether or not to add a label to a line. */ |
8aaa7f4ce06a
Let theme define whether or not to display a (yet static) label for line).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2321
diff
changeset
|
104 protected void applyShowLineLabel(XYLineAndShapeRenderer r, int idx) { |
8aaa7f4ce06a
Let theme define whether or not to display a (yet static) label for line).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2321
diff
changeset
|
105 if (!(r instanceof EnhancedLineAndShapeRenderer)) { |
8aaa7f4ce06a
Let theme define whether or not to display a (yet static) label for line).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2321
diff
changeset
|
106 return; |
8aaa7f4ce06a
Let theme define whether or not to display a (yet static) label for line).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2321
diff
changeset
|
107 } |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
108 boolean showLabelLine = theme.parseShowLineLabel(); |
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
109 boolean anyLabel = showLabelLine || theme.parseShowWidth() || |
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
110 theme.parseShowLevel() || |
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
111 theme.parseShowMiddleHeight(); |
3228
698d09930329
Fix issue695 (labels of waterlines).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3155
diff
changeset
|
112 ((EnhancedLineAndShapeRenderer)r).setShowLineLabel(anyLabel, idx); |
2648
8aaa7f4ce06a
Let theme define whether or not to display a (yet static) label for line).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2321
diff
changeset
|
113 } |
8aaa7f4ce06a
Let theme define whether or not to display a (yet static) label for line).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2321
diff
changeset
|
114 |
2656
f1dcd5f94ffa
Parse more theme properties for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2648
diff
changeset
|
115 |
2662
bdc86e61428c
Respect show line label bg setting.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2660
diff
changeset
|
116 /** Tells the renderer whether or not to fill the bg of a lines label. */ |
bdc86e61428c
Respect show line label bg setting.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2660
diff
changeset
|
117 protected void applyShowLineLabelBG(XYLineAndShapeRenderer r, int idx) { |
bdc86e61428c
Respect show line label bg setting.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2660
diff
changeset
|
118 if (!(r instanceof EnhancedLineAndShapeRenderer)) { |
bdc86e61428c
Respect show line label bg setting.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2660
diff
changeset
|
119 return; |
bdc86e61428c
Respect show line label bg setting.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2660
diff
changeset
|
120 } |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
121 boolean showLabelLine = theme.parseLabelShowBackground(); |
2662
bdc86e61428c
Respect show line label bg setting.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2660
diff
changeset
|
122 ((EnhancedLineAndShapeRenderer)r).setShowLineLabelBG(idx, showLabelLine); |
bdc86e61428c
Respect show line label bg setting.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2660
diff
changeset
|
123 } |
bdc86e61428c
Respect show line label bg setting.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2660
diff
changeset
|
124 |
2656
f1dcd5f94ffa
Parse more theme properties for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2648
diff
changeset
|
125 /** Tell the renderer which font (and -size and -style) to use for |
f1dcd5f94ffa
Parse more theme properties for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2648
diff
changeset
|
126 * linelabels. */ |
f1dcd5f94ffa
Parse more theme properties for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2648
diff
changeset
|
127 protected void applyLineLabelFont(XYLineAndShapeRenderer r, int idx) { |
f1dcd5f94ffa
Parse more theme properties for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2648
diff
changeset
|
128 if (!(r instanceof EnhancedLineAndShapeRenderer)) { |
f1dcd5f94ffa
Parse more theme properties for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2648
diff
changeset
|
129 return; |
f1dcd5f94ffa
Parse more theme properties for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2648
diff
changeset
|
130 } |
3464
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
131 ((EnhancedLineAndShapeRenderer)r).setLineLabelFont( |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
132 theme.parseTextFont(), idx); |
2656
f1dcd5f94ffa
Parse more theme properties for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2648
diff
changeset
|
133 } |
f1dcd5f94ffa
Parse more theme properties for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2648
diff
changeset
|
134 |
2660
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
135 /** Tell the renderer which color to use for |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
136 * linelabels. */ |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
137 protected void applyLineLabelColor(XYLineAndShapeRenderer r, int idx) { |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
138 if (!(r instanceof EnhancedLineAndShapeRenderer)) { |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
139 return; |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
140 } |
3464
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
141 ((EnhancedLineAndShapeRenderer)r).setLineLabelTextColor( |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
142 idx, theme.parseTextColor()); |
2660
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
143 } |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
144 |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
145 /** Tell the renderer which color to use for bg of |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
146 * linelabels. */ |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
147 protected void applyLineLabelBGColor(XYLineAndShapeRenderer r, int idx) { |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
148 if (!(r instanceof EnhancedLineAndShapeRenderer)) { |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
149 return; |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
150 } |
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
151 ((EnhancedLineAndShapeRenderer)r).setLineLabelBGColor(idx, |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
152 theme.parseTextBackground()); |
2660
1a044c51abe4
Respect colors of theme for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2656
diff
changeset
|
153 } |
2656
f1dcd5f94ffa
Parse more theme properties for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2648
diff
changeset
|
154 |
f1dcd5f94ffa
Parse more theme properties for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2648
diff
changeset
|
155 /** Set stroke of series. */ |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
156 protected void applyLineSize(XYLineAndShapeRenderer r, int idx) { |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
157 int size = theme.parseLineWidth(); |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
158 r.setSeriesStroke( |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
159 idx, |
3405
b0ba96bbf01d
Use Integer.parseInt() instead of Integer.valueOf() + Autounboxing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3228
diff
changeset
|
160 new BasicStroke(size)); |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
161 } |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
162 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
163 |
2656
f1dcd5f94ffa
Parse more theme properties for linelabels.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2648
diff
changeset
|
164 /** Set stroke strength of series. */ |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
165 protected void applyLineType(XYLineAndShapeRenderer r, int idx) { |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
166 int size = theme.parseLineWidth(); |
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
167 float[] dashes = theme.parseLineStyle(); |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
168 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
169 // Do not apply the dashed style. |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
170 if (dashes.length <= 1) { |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
171 return; |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
172 } |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
173 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
174 r.setSeriesStroke( |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
175 idx, |
3405
b0ba96bbf01d
Use Integer.parseInt() instead of Integer.valueOf() + Autounboxing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3228
diff
changeset
|
176 new BasicStroke(size, |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
177 BasicStroke.CAP_BUTT, |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
178 BasicStroke.JOIN_ROUND, |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
179 1.0f, |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
180 dashes, |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
181 0.0f)); |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
182 } |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
183 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
184 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
185 protected void applyPointSize(XYLineAndShapeRenderer r, int idx) { |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
186 int size = theme.parsePointWidth(); |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
187 int dim = 2 * size; |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
188 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
189 r.setSeriesShape(idx, new Ellipse2D.Double(-size, -size, dim, dim)); |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
190 } |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
191 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
192 |
3090
22def36d37b7
Apply point color in XYStyle.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2662
diff
changeset
|
193 protected void applyPointColor(XYLineAndShapeRenderer r, int idx) { |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
194 Color c = theme.parsePointColor(); |
3090
22def36d37b7
Apply point color in XYStyle.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2662
diff
changeset
|
195 |
22def36d37b7
Apply point color in XYStyle.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2662
diff
changeset
|
196 if (c != null) { |
22def36d37b7
Apply point color in XYStyle.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2662
diff
changeset
|
197 r.setSeriesFillPaint(idx, c); |
22def36d37b7
Apply point color in XYStyle.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2662
diff
changeset
|
198 r.setUseFillPaint(true); |
22def36d37b7
Apply point color in XYStyle.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2662
diff
changeset
|
199 r.setDrawOutlines(false); |
22def36d37b7
Apply point color in XYStyle.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2662
diff
changeset
|
200 } |
22def36d37b7
Apply point color in XYStyle.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2662
diff
changeset
|
201 } |
22def36d37b7
Apply point color in XYStyle.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2662
diff
changeset
|
202 |
22def36d37b7
Apply point color in XYStyle.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2662
diff
changeset
|
203 |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
204 /** |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
205 * Sets form and visibility of points. |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
206 */ |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
207 protected void applyShowPoints(XYLineAndShapeRenderer r, int idx) { |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
208 boolean show = theme.parseShowPoints(); |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
209 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
210 r.setSeriesShapesVisible(idx, show); |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
211 r.setDrawOutlines(true); |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
212 } |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
213 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
214 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
215 protected void applyShowLine(XYLineAndShapeRenderer r, int idx) { |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
216 boolean show = theme.parseShowLine(); |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
217 r.setSeriesLinesVisible(idx, show); |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
218 } |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
219 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
220 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
221 protected void applyShowMinimum(XYLineAndShapeRenderer r, int idx) { |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
222 if (!(r instanceof EnhancedLineAndShapeRenderer)) { |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
223 return; |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
224 } |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
225 |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
226 boolean visible = theme.parseShowMinimum(); |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
227 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
228 EnhancedLineAndShapeRenderer er = (EnhancedLineAndShapeRenderer) r; |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
229 er.setIsMinimumShapeVisisble(idx, visible); |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
230 } |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
231 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
232 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
233 protected void applyShowMaximum(XYLineAndShapeRenderer r, int idx) { |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
234 if (!(r instanceof EnhancedLineAndShapeRenderer)) { |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
235 return; |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
236 } |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
237 |
6905
1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
238 boolean visible = theme.parseShowMaximum(); |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
239 |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
240 EnhancedLineAndShapeRenderer er = (EnhancedLineAndShapeRenderer) r; |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
241 er.setIsMaximumShapeVisible(idx, visible); |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
242 } |
3134
5a0aef74c316
Use different stylings for real and interpolated data points.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3090
diff
changeset
|
243 |
5a0aef74c316
Use different stylings for real and interpolated data points.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3090
diff
changeset
|
244 |
3464
0b9b2a0c4e64
Point labels can have a background color now.
Christian Lins <christian.lins@intevation.de>
parents:
3405
diff
changeset
|
245 @Override |
3134
5a0aef74c316
Use different stylings for real and interpolated data points.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3090
diff
changeset
|
246 public XYLineAndShapeRenderer getRenderer() { |
5a0aef74c316
Use different stylings for real and interpolated data points.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3090
diff
changeset
|
247 return this.renderer; |
5a0aef74c316
Use different stylings for real and interpolated data points.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3090
diff
changeset
|
248 } |
2321
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
249 } |
991e4a5df323
Enabled styling in timeseries charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
250 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |