Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/utils/Formatter.java @ 2206:e2124ca11adb
Add manual point handling for many different chart types.
flys-artifacts/trunk@3830 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 30 Jan 2012 13:33:18 +0000 |
parents | bda04ae1154f |
children | ea173e4c07c7 |
rev | line source |
---|---|
445
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.utils; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.text.NumberFormat; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import java.util.Locale; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import de.intevation.artifacts.CallContext; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 import de.intevation.flys.artifacts.resources.Resources; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 public final class Formatter { |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 // WATERLEVEL FORMATTER CONSTANTS |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 public static final int WATERLEVEL_KM_MIN_DIGITS = 3; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 public static final int WATERLEVEL_KM_MAX_DIGITS = 3; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 public static final int WATERLEVEL_W_MIN_DIGITS = 0; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 public static final int WATERLEVEL_W_MAX_DIGITS = 2; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 public static final int WATERLEVEL_Q_MIN_DIGITS = 0; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 public static final int WATERLEVEL_Q_MAX_DIGITS = 2; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 // COMPUTED DISCHARGE CURVE FORMATTER CONSTANTS |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 public static final int COMPUTED_DISCHARGE_W_MIN_DIGITS = 2; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 public static final int COMPUTED_DISCHARGE_W_MAX_DIGITS = 2; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 public static final int COMPUTED_DISCHARGE_Q_MIN_DIGITS = 0; |
1683
acb4d20b130e
Changed max number of digits for AT exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
445
diff
changeset
|
26 public static final int COMPUTED_DISCHARGE_Q_MAX_DIGITS = 2; |
445
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 // DURATION CURVE FORMATTER CONSTANTS |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 public static final int DURATION_W_MIN_DIGITS = 0; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 public static final int DURATION_W_MAX_DIGITS = 2; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 public static final int DURATION_Q_MIN_DIGITS = 0; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 public static final int DURATION_Q_MAX_DIGITS = 1; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 public static final int DURATION_D_MIN_DIGITS = 0; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 public static final int DURATION_D_MAX_DIGITS = 0; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 public static NumberFormat getFormatter(CallContext c, int min, int max){ |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 Locale locale = Resources.getLocale(c.getMeta()); |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 NumberFormat nf = NumberFormat.getInstance(locale); |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 nf.setMaximumFractionDigits(max); |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 nf.setMinimumFractionDigits(min); |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 return nf; |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 } |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 /** |
2087
bda04ae1154f
#196 Localized the WQ labels in CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1683
diff
changeset
|
50 * Returns a number formatter with no max or min digits set. |
bda04ae1154f
#196 Localized the WQ labels in CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1683
diff
changeset
|
51 * |
bda04ae1154f
#196 Localized the WQ labels in CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1683
diff
changeset
|
52 * @param c The CallContext. |
bda04ae1154f
#196 Localized the WQ labels in CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1683
diff
changeset
|
53 * |
bda04ae1154f
#196 Localized the WQ labels in CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1683
diff
changeset
|
54 * @return a number formatter. |
bda04ae1154f
#196 Localized the WQ labels in CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1683
diff
changeset
|
55 */ |
bda04ae1154f
#196 Localized the WQ labels in CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1683
diff
changeset
|
56 public static NumberFormat getRawFormatter(CallContext c) { |
bda04ae1154f
#196 Localized the WQ labels in CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1683
diff
changeset
|
57 Locale locale = Resources.getLocale(c.getMeta()); |
bda04ae1154f
#196 Localized the WQ labels in CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1683
diff
changeset
|
58 return NumberFormat.getInstance(locale); |
bda04ae1154f
#196 Localized the WQ labels in CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1683
diff
changeset
|
59 } |
bda04ae1154f
#196 Localized the WQ labels in CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1683
diff
changeset
|
60 |
bda04ae1154f
#196 Localized the WQ labels in CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1683
diff
changeset
|
61 |
bda04ae1154f
#196 Localized the WQ labels in CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1683
diff
changeset
|
62 /** |
445
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 * Returns the number formatter for kilometer values in waterlevel exports. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 * |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 * @return the number formatter for kilometer values. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 */ |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 public static NumberFormat getWaterlevelKM(CallContext context) { |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 return getFormatter( |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 context, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 WATERLEVEL_KM_MIN_DIGITS, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 WATERLEVEL_KM_MAX_DIGITS); |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 } |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 /** |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 * Returns the number formatter for W values in waterlevel exports. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 * |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 * @return the number formatter for W values. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 */ |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 public static NumberFormat getWaterlevelW(CallContext context) { |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 return getFormatter( |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 context, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 WATERLEVEL_W_MIN_DIGITS, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 WATERLEVEL_W_MAX_DIGITS); |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 } |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 /** |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 * Returns the number formatter for Q values in waterlevel exports. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 * |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 * @return the number formatter for Q values. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 */ |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 public static NumberFormat getWaterlevelQ(CallContext context) { |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
94 return getFormatter( |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 context, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 WATERLEVEL_Q_MIN_DIGITS, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
97 WATERLEVEL_Q_MAX_DIGITS); |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
98 } |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
99 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 /** |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 * Returns the number formatter for W values in exports of computed |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
103 * discharge curves. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
104 * |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
105 * @return the number formatter for W values. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
106 */ |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
107 public static NumberFormat getComputedDischargeW(CallContext context) { |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
108 return getFormatter( |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
109 context, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
110 COMPUTED_DISCHARGE_W_MIN_DIGITS, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 COMPUTED_DISCHARGE_W_MAX_DIGITS); |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
112 } |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
113 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
114 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
115 /** |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
116 * Returns the number formatter for Q values in exports of computed |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
117 * discharge curves. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
118 * |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
119 * @return the number formatter for Q values. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
120 */ |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
121 public static NumberFormat getComputedDischargeQ(CallContext context) { |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 return getFormatter( |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
123 context, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
124 COMPUTED_DISCHARGE_Q_MIN_DIGITS, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 COMPUTED_DISCHARGE_Q_MAX_DIGITS); |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
126 } |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
127 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
128 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
129 /** |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
130 * Returns the number formatter for W values in duration curve exports. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
131 * |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
132 * @return the number formatter for W values. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
133 */ |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
134 public static NumberFormat getDurationW(CallContext context) { |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
135 return getFormatter( |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
136 context, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
137 DURATION_W_MIN_DIGITS, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
138 DURATION_W_MAX_DIGITS); |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
139 } |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
140 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
141 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
142 /** |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
143 * Returns the number formatter for Q values in duration curve exports. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
144 * |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
145 * @return the number formatter for W values. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
146 */ |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
147 public static NumberFormat getDurationQ(CallContext context) { |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
148 return getFormatter( |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
149 context, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
150 DURATION_Q_MIN_DIGITS, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
151 DURATION_Q_MAX_DIGITS); |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
152 } |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
153 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
154 |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
155 /** |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
156 * Returns the number formatter for D values in duration curve exports. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
157 * |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
158 * @return the number formatter for W values. |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
159 */ |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
160 public static NumberFormat getDurationD(CallContext context) { |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
161 return getFormatter( |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
162 context, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
163 DURATION_D_MIN_DIGITS, |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
164 DURATION_D_MAX_DIGITS); |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
165 } |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
166 } |
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
167 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |