[PATCH 3 of 5] Add AxisLabel handling to WDiffProcessor

Wald Commits scm-commit at wald.intevation.org
Mon Sep 23 16:43:52 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1379944509 -7200
# Branch generator-refactoring
# Node ID 5009b151f146e82276de004c78e3886fbac76f83
# Parent  13a842224694cdc563be248b47191c296a58780b
Add AxisLabel handling to WDiffProcessor

diff -r 13a842224694 -r 5009b151f146 artifacts/src/main/java/org/dive4elements/river/exports/process/WDiffProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/WDiffProcessor.java	Mon Sep 23 15:46:05 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/WDiffProcessor.java	Mon Sep 23 15:55:09 2013 +0200
@@ -12,9 +12,15 @@
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.WKms;
 import org.dive4elements.river.themes.ThemeDocument;
+import org.dive4elements.river.exports.DiagramGenerator;
 
 public class WDiffProcessor extends WOutProcessor {
 
+    public final static String I18N_WDIFF_YAXIS_LABEL =
+        "chart.w_differences.yaxis.label";
+
+    public final static String I18N_WDIFF_YAXIS_LABEL_DEFAULT = "m";
+
     @Override
     public boolean canHandle(String facetType) {
         if (facetType == null) {
@@ -22,5 +28,12 @@
         }
         return facetType.equals(FacetTypes.W_DIFFERENCES);
     }
+
+
+    @Override
+    public String getAxisLabel(DiagramGenerator generator) {
+        return generator.msg(I18N_WDIFF_YAXIS_LABEL,
+                I18N_WDIFF_YAXIS_LABEL_DEFAULT);
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :


More information about the Dive4elements-commits mailing list