Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MainValuesWFacet.java @ 3185:f1e4b37dcb60
Enable legend item aggreation in time series charts.
flys-artifacts/trunk@4800 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 26 Jun 2012 13:07:18 +0000 |
parents | 772d0c8100d3 |
children | 0f7abd95c6e2 |
rev | line source |
---|---|
1085
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model; |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
2 |
1679
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
3 import java.util.ArrayList; |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
4 import java.util.List; |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
5 |
2775
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
6 import org.apache.log4j.Logger; |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
7 |
1085
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
8 import de.intevation.artifacts.Artifact; |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.artifacts.CallContext; |
2775
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
10 import de.intevation.artifacts.DataProvider; |
1679
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
11 |
1085
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
12 import de.intevation.artifactdatabase.state.DefaultFacet; |
1679
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
13 |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
14 import de.intevation.flys.artifacts.MainValuesArtifact; |
2775
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
15 import de.intevation.flys.artifacts.math.Linear; |
1085
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
16 import de.intevation.flys.artifacts.model.FacetTypes; |
2775
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
17 import de.intevation.flys.artifacts.model.WQDay; |
1679
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
18 import de.intevation.flys.jfree.FLYSAnnotation; |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
19 import de.intevation.flys.jfree.StickyAxisAnnotation; |
1085
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
20 |
2161
c68f4f227c09
Somewhat unified Annotation handling, use jfreechart-house-toolkit instead of custom StickyAxisAnnotation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1957
diff
changeset
|
21 |
1085
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
22 /** |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
23 * Facet to show Main W Values. |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
24 */ |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
25 public class MainValuesWFacet |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
26 extends DefaultFacet |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
27 implements FacetTypes { |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
28 |
2775
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
29 /** Own logger. */ |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
30 private static Logger logger = Logger.getLogger(RelativePointFacet.class); |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
31 |
1957
3b08b8aacfb0
Fix flys/issue423, do not interpolate main values at gauge.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1809
diff
changeset
|
32 /** Do we want MainValues at Gauge (not interpolated)? */ |
3b08b8aacfb0
Fix flys/issue423, do not interpolate main values at gauge.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1809
diff
changeset
|
33 protected boolean isAtGauge; |
3b08b8aacfb0
Fix flys/issue423, do not interpolate main values at gauge.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1809
diff
changeset
|
34 |
1085
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
35 /** Trivial Constructor. */ |
1957
3b08b8aacfb0
Fix flys/issue423, do not interpolate main values at gauge.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1809
diff
changeset
|
36 public MainValuesWFacet(String name, String description, boolean atGauge) { |
1112
aeae4d20f32f
Fix translations of Main Values Facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1085
diff
changeset
|
37 this.description = description; |
1809
f6a190f6aaff
Give outputname to artifacts getInitialFacetActivity, generate second pair of MainvalueFacets for discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1679
diff
changeset
|
38 this.name = name; |
1957
3b08b8aacfb0
Fix flys/issue423, do not interpolate main values at gauge.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1809
diff
changeset
|
39 this.index = 0; |
3b08b8aacfb0
Fix flys/issue423, do not interpolate main values at gauge.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1809
diff
changeset
|
40 this.isAtGauge = atGauge; |
1085
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
41 } |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
42 |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
43 |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
44 /** |
2775
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
45 * Set the hit-point in W where a line drawn from the axis would hit the |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
46 * curve in WQDay (if hit). |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
47 * Employ linear interpolation. |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
48 */ |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
49 protected static void setHitPoint(WQDay wqday, StickyAxisAnnotation annotation) { |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
50 int idx = 0; |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
51 float w = annotation.getPos(); |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
52 boolean wIncreases = wqday.getW(0) < wqday.getW(wqday.size()-1); |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
53 if (wIncreases) { |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
54 while (idx < wqday.size() && wqday.getW(idx) < w) { |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
55 idx++; |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
56 } |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
57 } |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
58 else { |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
59 idx = wqday.size() -1; |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
60 while (idx > 0 && wqday.getW(idx) > w) { |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
61 idx--; |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
62 } |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
63 } |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
64 |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
65 double day = 0d; |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
66 int mod = (wIncreases) ? -1 : +1; |
2780
772d0c8100d3
Improved 'line-to-curve' rendering.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2775
diff
changeset
|
67 if (idx != 0 && idx < wqday.size()-1-mod) { |
2775
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
68 day = Linear.linear(w, wqday.getW(idx +mod), wqday.getW(idx), |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
69 wqday.getDay(idx+mod), wqday.getDay(idx)); |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
70 annotation.setHitPoint((float)day); |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
71 } |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
72 else { |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
73 logger.debug("StickyAnnotation does not hit wqday curve"); |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
74 } |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
75 } |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
76 |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
77 |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
78 /** |
1085
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
79 * Returns the data this facet requires. |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
80 * |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
81 * @param artifact the owner artifact. |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
82 * @param context the CallContext (ignored). |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
83 * |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
84 * @return the data. |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
85 */ |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
86 @Override |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
87 public Object getData(Artifact artifact, CallContext context) { |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
88 MainValuesArtifact mvArtifact = (MainValuesArtifact) artifact; |
1679
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
89 |
1957
3b08b8aacfb0
Fix flys/issue423, do not interpolate main values at gauge.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1809
diff
changeset
|
90 List<NamedDouble> ws = mvArtifact.getMainValuesW(isAtGauge); |
2161
c68f4f227c09
Somewhat unified Annotation handling, use jfreechart-house-toolkit instead of custom StickyAxisAnnotation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1957
diff
changeset
|
91 List<StickyAxisAnnotation> xy = new ArrayList<StickyAxisAnnotation>(); |
1679
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
92 |
2780
772d0c8100d3
Improved 'line-to-curve' rendering.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2775
diff
changeset
|
93 // Find whether a duration curve is on the blackboard. |
2775
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
94 WQDay wqdays = null; |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
95 List<DataProvider> providers = context. |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
96 getDataProvider(DurationCurveFacet.BB_DURATIONCURVE); |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
97 if (providers.size() < 1) { |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
98 logger.warn("Could not find durationcurve data provider."); |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
99 } |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
100 else { |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
101 wqdays = (WQDay) providers.get(0).provideData( |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
102 DurationCurveFacet.BB_DURATIONCURVE, |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
103 null, |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
104 context); |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
105 } |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
106 |
1679
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
107 for (NamedDouble w: ws) { |
2775
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
108 StickyAxisAnnotation annotation = |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
109 new StickyAxisAnnotation( |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
110 w.getName(), |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
111 (float) w.getValue(), |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
112 StickyAxisAnnotation.SimpleAxis.Y_AXIS); |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
113 xy.add(annotation); |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
114 if (wqdays != null) { |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
115 setHitPoint(wqdays, annotation); |
5016609663e2
Draw line from w-annotation to duration curve, rough version.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2161
diff
changeset
|
116 } |
1679
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
117 } |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
118 |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1112
diff
changeset
|
119 return new FLYSAnnotation(description, xy); |
1085
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
120 } |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
121 |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
122 |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
123 /** |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
124 * Create a deep copy of this Facet. |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
125 * @return a deep copy. |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
126 */ |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
127 @Override |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
128 public MainValuesWFacet deepCopy() { |
1957
3b08b8aacfb0
Fix flys/issue423, do not interpolate main values at gauge.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1809
diff
changeset
|
129 MainValuesWFacet copy = new MainValuesWFacet(this.name, |
3b08b8aacfb0
Fix flys/issue423, do not interpolate main values at gauge.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1809
diff
changeset
|
130 description, this.isAtGauge); |
1085
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
131 copy.set(this); |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
132 return copy; |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
133 } |
07878836ee0d
Plot "real" (respecting parameters) W and Q MainValues, yet in wrong scale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
134 } |
1809
f6a190f6aaff
Give outputname to artifacts getInitialFacetActivity, generate second pair of MainvalueFacets for discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1679
diff
changeset
|
135 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |