changeset 8630:5210e1dd303e

(issue1753) Fix number format for S
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 26 Mar 2015 12:11:49 +0100
parents 97365575da6f
children b30068e92757
files artifacts/src/main/java/org/dive4elements/river/exports/sq/SQRelationExporter.java
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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)

http://dive4elements.wald.intevation.org