changeset 6123:036b02fc0c81

flys1225/4: Absolute height axis label with wstunits.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 28 May 2013 17:54:17 +0200
parents d83f1e7b6681
children 06cb01e8aef3
files artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDiffHeightYearGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceYearGenerator.java
diffstat 3 files changed, 16 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDiffHeightYearGenerator.java	Tue May 28 17:53:27 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDiffHeightYearGenerator.java	Tue May 28 17:54:17 2013 +0200
@@ -148,7 +148,9 @@
 
     @Override
     protected String getDefaultXAxisLabel() {
-        return msg(I18N_XAXIS_LABEL, I18N_XAXIS_LABEL_DEFAULT);
+        return msg(I18N_XAXIS_LABEL,
+            I18N_XAXIS_LABEL_DEFAULT,
+            new Object[] { getRiverName() });
     }
 
     @Override
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java	Tue May 28 17:53:27 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java	Tue May 28 17:54:17 2013 +0200
@@ -29,6 +29,7 @@
 import org.dive4elements.river.jfree.RiverAnnotation;
 import org.dive4elements.river.jfree.StyledXYSeries;
 import org.dive4elements.river.utils.DataUtil;
+import org.dive4elements.river.utils.RiverUtils;
 
 
 public class BedDifferenceEpochGenerator
@@ -196,7 +197,11 @@
             label = msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT);
         }
         else if (pos == YAXIS.H.idx) {
-            label = msg(I18N_SECOND_YAXIS_LABEL, I18N_SECOND_YAXIS_LABEL_DEFAULT);
+            D4EArtifact flys = (D4EArtifact) master;
+            label = msg(I18N_SECOND_YAXIS_LABEL,
+                I18N_SECOND_YAXIS_LABEL_DEFAULT,
+                new Object[]
+                    { RiverUtils.getRiver(flys).getWstUnit().getName() });
         }
         else if (pos == YAXIS.dW.idx) {
             return msg(I18N_DW_YAXIS_LABEL, I18N_DW_YAXIS_LABEL_DEFAULT);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceYearGenerator.java	Tue May 28 17:53:27 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceYearGenerator.java	Tue May 28 17:54:17 2013 +0200
@@ -14,6 +14,7 @@
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifactdatabase.state.Facet;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.WKms;
 import org.dive4elements.river.artifacts.model.minfo.BedDiffYearResult;
@@ -29,6 +30,7 @@
 import org.dive4elements.river.jfree.RiverAnnotation;
 import org.dive4elements.river.jfree.StyledXYSeries;
 import org.dive4elements.river.utils.DataUtil;
+import org.dive4elements.river.utils.RiverUtils;
 
 
 public class BedDifferenceYearGenerator
@@ -247,7 +249,11 @@
             label = msg(I18N_SECOND_YAXIS_LABEL, I18N_SECOND_YAXIS_LABEL_DEFAULT);
         }
         else if (pos == YAXIS.H.idx) {
-            label = msg(I18N_THIRD_YAXIS_LABEL, I18N_THIRD_YAXIS_LABEL_DEFAULT);
+            D4EArtifact flys = (D4EArtifact) master;
+            label = msg(I18N_THIRD_YAXIS_LABEL,
+                I18N_THIRD_YAXIS_LABEL_DEFAULT,
+                new Object[]
+                    { RiverUtils.getRiver(flys).getWstUnit().getName() });
         }
         else if (pos == YAXIS.dW.idx) {
             label = msg(I18N_DW_YAXIS_LABEL, I18N_DW_YAXIS_LABEL_DEFAULT);

http://dive4elements.wald.intevation.org