Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/utils/Formatter.java @ 2787:e63969c173e9
FixA: Added CSV export for Delta W/t values.
flys-artifacts/trunk@4526 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 26 May 2012 21:26:10 +0000 |
parents | 2952f6dee5cf |
children | 296b067e17e6 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/Formatter.java Sat May 26 20:13:00 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/Formatter.java Sat May 26 21:26:10 2012 +0000 @@ -71,6 +71,11 @@ public static final int MIDDLE_BED_HEIGHT_WIDTH_MIN_DIGITS = 3; public static final int MIDDLE_BED_HEIGHT_WIDTH_MAX_DIGITS = 3; + public static final int FIX_DELTA_W_KM_MIN_DIGITS = 3; + public static final int FIX_DELTA_W_KM_MAX_DIGITS = 3; + public static final int FIX_DELTA_W_DELTA_W_MIN_DIGITS = 3; + public static final int FIX_DELTA_W_DELTA_W_MAX_DIGITS = 3; + public static NumberFormat getFormatter(CallMeta m, int min, int max){ Locale locale = Resources.getLocale(m); NumberFormat nf = NumberFormat.getInstance(locale); @@ -328,5 +333,19 @@ MIDDLE_BED_HEIGHT_WIDTH_MIN_DIGITS, MIDDLE_BED_HEIGHT_WIDTH_MAX_DIGITS); } + + public static NumberFormat getFixDeltaWKM(CallContext context) { + return getFormatter( + context, + FIX_DELTA_W_KM_MIN_DIGITS, + FIX_DELTA_W_KM_MAX_DIGITS); + } + + public static NumberFormat getFixDeltaWDeltaW(CallContext context) { + return getFormatter( + context, + FIX_DELTA_W_DELTA_W_MIN_DIGITS, + FIX_DELTA_W_DELTA_W_MAX_DIGITS); + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :