[PATCH 9 of 9] (issue1753) Fix number format for S

Wald Commits scm-commit at wald.intevation.org
Thu Mar 26 12:12:03 CET 2015


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1427368309 -3600
# Node ID 5210e1dd303ec6629aa84bc65359baac46ac36f6
# Parent  97365575da6f87d06991bea2c5cbaa923a8d69f4
(issue1753) Fix number format for S

diff -r 97365575da6f -r 5210e1dd303e artifacts/src/main/java/org/dive4elements/river/exports/sq/SQRelationExporter.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQRelationExporter.java	Thu Mar 26 12:07:43 2015 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQRelationExporter.java	Thu Mar 26 12:11:49 2015 +0100
@@ -258,7 +258,6 @@
         NumberFormat sqBFormatter = Formatter.getSQRelationB(context);
         NumberFormat fThreeFormatter = Formatter.getFormatter(context, 3, 3);
         NumberFormat fTwoFormatter = Formatter.getFormatter(context, 2, 2);
-        NumberFormat fZeroThreeFormatter = Formatter.getFormatter(context, 0, 3);
         NumberFormat fZeroFormatter = Formatter.getFormatter(context, 0, 0);
         DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT,
                 Resources.getLocale(context.getMeta()));
@@ -303,7 +302,7 @@
                         o, // 8
                         c_duan, // 9
                         c_ferguson, // 10
-                        fZeroThreeFormatter.format(sq.getS()),
+                        fThreeFormatter.format(sq.getS()),
                         fZeroFormatter.format(sq.getQ()),
                         df.format(sq.getDate())
                     });
@@ -346,7 +345,7 @@
     protected SQMeasurementsJRDataSource createMeasurementJRData() {
         SQMeasurementsJRDataSource source = new SQMeasurementsJRDataSource();
         NumberFormat fZeroFormatter = Formatter.getFormatter(context, 0, 0);
-        NumberFormat fZeroThreeFormatter = Formatter.getFormatter(context, 0, 3);
+        NumberFormat fThreeFormatter = Formatter.getFormatter(context, 3, 3);
         DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT,
                 Resources.getLocale(context.getMeta()));
 
@@ -358,7 +357,7 @@
                     for (SQ sq: fraction.getMeasurements()) {
                         source.addData(new String[] {
                             name,
-                            fZeroThreeFormatter.format(sq.getS()),
+                            fThreeFormatter.format(sq.getS()),
                             fZeroFormatter.format(sq.getQ()),
                             df.format(sq.getDate()),
                             null
@@ -368,7 +367,7 @@
                         for (SQ sq: fraction.getOutliers(j)) {
                             source.addData(new String[] {
                                 name,
-                                fZeroThreeFormatter.format(sq.getS()),
+                                fThreeFormatter.format(sq.getS()),
                                 fZeroFormatter.format(sq.getQ()),
                                 df.format(sq.getDate()),
                                 Integer.toString(j + 1)


More information about the Dive4Elements-commits mailing list