Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/utils/Formatter.java @ 6207:a82a724356f0
Updade sq relation pdf export as specified in issue1071
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 05 Jun 2013 14:44:36 +0200 |
parents | 58a613798386 |
children | 8c976bb0362f |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/utils/Formatter.java Wed Jun 05 13:18:25 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/Formatter.java Wed Jun 05 14:44:36 2013 +0200 @@ -88,12 +88,14 @@ public static final int FIX_DELTA_W_DELTA_Q_MIN_DIGITS = 0; public static final int FIX_DELTA_W_DELTA_Q_MAX_DIGITS = 2; - public static final int VARIANCE_MIN_DIGITS = 0; - public static final int VARIANCE_MAX_DIGITS = 4; + public static final int VARIANCE_MIN_DIGITS = 3; + public static final int VARIANCE_MAX_DIGITS = 3; // SQ Relation - public static final int SQ_RELATION_MAX_DIGITS = 8; - public static final int SQ_RELATION_MIN_DIGITS = 0; + public static final int SQ_RELATION_A_MAX_DIGITS = 7; + public static final int SQ_RELATION_A_MIN_DIGITS = 7; + public static final int SQ_RELATION_B_MAX_DIGITS = 3; + public static final int SQ_RELATION_B_MIN_DIGITS = 3; /** * Creates a localized NumberFormatter with given range of decimal digits. @@ -437,12 +439,18 @@ VARIANCE_MAX_DIGITS); } - public static NumberFormat getSQRelation(CallContext context) { - // Would be nice if E0 would not be shown - return getScientificFormater( + public static NumberFormat getSQRelationA(CallContext context) { + return getFormatter( context, - SQ_RELATION_MIN_DIGITS, - SQ_RELATION_MAX_DIGITS); + SQ_RELATION_A_MIN_DIGITS, + SQ_RELATION_A_MAX_DIGITS); + } + + public static NumberFormat getSQRelationB(CallContext context) { + return getFormatter( + context, + SQ_RELATION_B_MIN_DIGITS, + SQ_RELATION_B_MAX_DIGITS); } public static NumberFormat getMeterFormat(CallContext context) {