Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedHeightSingle.java @ 4282:8b4988815974
Added marker for Ws and Qs in Historical Discharge WQ charts.
Therefore, the XYChartGenerator got two new methods addDomainMarker(Marker, boolean) and addValueMarker(Marker, boolean).
The boolean parameters determine, if the marker should be visible or not. This is analogous to addAxisSeries(XYSeries, int, boolean).
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 29 Oct 2012 05:59:27 +0100 |
parents | bce2dd4310a6 |
children | 0a0ab6909cd8 |
rev | line source |
---|---|
3886
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model.minfo; |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
2 |
3897
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
3 import gnu.trove.TDoubleArrayList; |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
4 |
3886
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
5 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
6 public class BedHeightSingle |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
7 extends BedHeight |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
8 { |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
9 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
10 protected int year; |
3897
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
11 protected TDoubleArrayList data_gap; |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
12 protected TDoubleArrayList morphWidth; |
3886
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 public BedHeightSingle() { |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 super(); |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 this.year = -1; |
3897
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
17 data_gap = new TDoubleArrayList(); |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
18 morphWidth = new TDoubleArrayList(); |
3886
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
19 } |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 public BedHeightSingle(String name) { |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 super(name); |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 this.year = -1; |
3897
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
24 data_gap = new TDoubleArrayList(); |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
25 morphWidth = new TDoubleArrayList(); |
3886
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 } |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
27 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
28 public void add( |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
29 double value, |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
30 double station, |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
31 double gap, |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
32 double width, |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
33 int year |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
34 ) { |
3897
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
35 super.add(value, station); |
3886
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
36 this.year = year; |
3897
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
37 this.data_gap.add(gap); |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
38 this.morphWidth.add(width); |
3886
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
39 } |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
40 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
41 public int getYear() { |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
42 return this.year; |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
43 } |
3897
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
44 |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
45 public double getMorphWidth(int idx) { |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
46 return this.morphWidth.get(idx); |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
47 } |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
48 |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
49 public double getDataGap(int idx) { |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
50 return this.data_gap.get(idx); |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
51 } |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
52 |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
53 public double getMorphWidth(double station) { |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
54 if (this.station.indexOf(station) >= 0) { |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
55 return this.morphWidth.get(this.station.indexOf(station)); |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
56 } |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
57 return Double.NaN; |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
58 } |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
59 |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
60 public double getDataGap(double station) { |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
61 if (this.station.indexOf(station) >= 0) { |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
62 return this.getDataGap(this.station.indexOf(station)); |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
63 } |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
64 return Double.NaN; |
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
65 } |
3886
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
66 } |