changeset 7615:edb323a4c286

(issue1620) join column names with two empty spaces The size limit of 9 characters is already enforced in addcolumn so this can be safely removed.
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 29 Nov 2013 11:13:31 +0100
parents 3e3a4f44423a
children 9fc549a7f5cb
files artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java artifacts/src/main/java/org/dive4elements/river/exports/WstWriter.java
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java	Fri Nov 29 11:12:31 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java	Fri Nov 29 11:13:31 2013 +0100
@@ -816,7 +816,7 @@
         // for details.
         for (WQKms wqkms: officalFixings) {
             // To add some spaces here or to add them in the writer,..
-            writer.addColumn("   " + getDesc(wqkms, true));
+            writer.addColumn(getDesc(wqkms, true));
 
             // Get all lines from the calculation
             Map <Double, WstLine> calcLines = writer.getLines();
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WstWriter.java	Fri Nov 29 11:12:31 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/WstWriter.java	Fri Nov 29 11:13:31 2013 +0100
@@ -22,6 +22,7 @@
 import java.util.TreeMap;
 
 import org.apache.log4j.Logger;
+import org.apache.commons.lang.StringUtils;
 
 import org.dive4elements.river.artifacts.model.WstLine;
 
@@ -165,9 +166,7 @@
         writer.println(cols);
         writer.print("        ");
 
-        for (String columnName: columnNames) {
-            writer.printf(locale, "%9s", columnName);
-        }
+        writer.print(StringUtils.join(columnNames, "  "));
 
         writer.println();
 

http://dive4elements.wald.intevation.org