diff artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZonesCalculationResult.java @ 9260:b570b6fcc052

VegetationZone color added and disabled
author gernotbelger
date Tue, 17 Jul 2018 10:59:27 +0200
parents a4121ec450d6
children b3d3c958a594
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZonesCalculationResult.java	Mon Jul 16 08:43:07 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZonesCalculationResult.java	Tue Jul 17 10:59:27 2018 +0200
@@ -41,7 +41,8 @@
         header.add(exportContextCSV.formatCsvHeader(UInfoResultType.vegname));
         header.add(exportContextCSV.formatCsvHeader(UInfoResultType.vegdauervon));
         header.add(exportContextCSV.formatCsvHeader(UInfoResultType.vegdauerbis));
-
+        if (VegetationZone.HAS_COLORS_EDITABLE)
+            header.add(exportContextCSV.formatCsvHeader(UInfoResultType.vegzone_color));
         exportContextCSV.writeCSVLine(header.toArray(new String[header.size()]));
     }
 
@@ -74,7 +75,7 @@
         exportContextPDF.addJRMetadata(source, "veg_name", UInfoResultType.vegname);
         exportContextPDF.addJRMetadata(source, "veg_dauervon", UInfoResultType.vegdauervon);
         exportContextPDF.addJRMetadata(source, "veg_dauerbis", UInfoResultType.vegdauerbis);
-
+        // TODO add color to jasper-template and here
     }
 
     protected String[] formatRow(final IExportContext context, final ResultRow row) {
@@ -84,7 +85,8 @@
         lines.add(context.formatRowValue(row, UInfoResultType.vegname));
         lines.add(context.formatRowValue(row, UInfoResultType.vegdauervon));
         lines.add(context.formatRowValue(row, UInfoResultType.vegdauerbis));
-
+        if (VegetationZone.HAS_COLORS_EDITABLE)
+            lines.add(context.formatRowValue(row, UInfoResultType.vegzone_color));
         return lines.toArray(new String[lines.size()]);
     }
 

http://dive4elements.wald.intevation.org