[Dive4elements-commits] [PATCH 2 of 3] part of issue986: axis label includes correct wst-unit

Wald Commits scm-commit at wald.intevation.org
Mon Jun 3 14:44:58 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1370263951 -7200
# Node ID 2441a8cc8f3773e3b0bad8fe89c73b23e7bda4a1
# Parent  5531d54581db05674c31451f86df722b54f25eb0
part of issue986: axis label includes correct wst-unit.

diff -r 5531d54581db -r 2441a8cc8f37 artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightGenerator.java	Mon Jun 03 14:51:57 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightGenerator.java	Mon Jun 03 14:52:31 2013 +0200
@@ -148,7 +148,13 @@
      * Get internationalized label for the y axis.
      */
     protected String getHAxisLabel() {
-        return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT);
+        D4EArtifact flys = (D4EArtifact) master;
+
+        String unit = RiverUtils.getRiver(flys).getWstUnit().getName();
+
+        return msg(I18N_YAXIS_LABEL,
+            I18N_YAXIS_LABEL_DEFAULT,
+            new Object[] { unit });
     }
 
 


More information about the Dive4elements-commits mailing list