changeset 6517:ef3b02034f6a

More consistent labeling for longitudinal section diagrams
author Tom Gottfried <tom@intevation.de>
date Fri, 28 Jun 2013 21:05:52 +0200
parents c28f13c80979
children 1a7f5d09b9d8
files artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixLongitudinalSectionGenerator.java 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 artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadLSGenerator.java
diffstat 9 files changed, 14 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java	Fri Jun 28 20:36:51 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java	Fri Jun 28 21:05:52 2013 +0200
@@ -42,7 +42,7 @@
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
  */
 public class FlowVelocityGenerator
-extends      XYChartGenerator
+extends      LongitudinalSectionGenerator
 implements   FacetTypes
 {
     public enum YAXIS {
@@ -85,9 +85,6 @@
     public static final String I18N_CHART_SHORT_SUBTITLE =
         "chart.flow_velocity.section.shortsubtitle";
 
-    public static final String I18N_XAXIS_LABEL =
-        "chart.flow_velocity.section.xaxis.label";
-
     public static final String I18N_YAXIS_LABEL =
         "chart.flow_velocity.section.yaxis.label";
 
@@ -99,7 +96,6 @@
     public static final String I18N_4YAXIS_LABEL = "chart.bedquality.yaxis.label.diameter";
 
     public static final String I18N_CHART_TITLE_DEFAULT  = "Geschwindigkeit- und Schubspannung";
-    public static final String I18N_XAXIS_LABEL_DEFAULT  = "km";
     public static final String I18N_YAXIS_LABEL_DEFAULT  = "Geschwindigkeit v [m/s]";
     public static final String I18N_2YAXIS_LABEL_DEFAULT = "Schubspannung Tau [N]";
     public static final String I18N_3YAXIS_LABEL_DEFAULT = "Q [m³/s]";
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java	Fri Jun 28 20:36:51 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java	Fri Jun 28 21:05:52 2013 +0200
@@ -151,7 +151,7 @@
      * @return the default title for this chart.
      */
     @Override
-    public String getDefaultChartTitle() {
+    protected String getDefaultChartTitle() {
         return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightGenerator.java	Fri Jun 28 20:36:51 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightGenerator.java	Fri Jun 28 21:05:52 2013 +0200
@@ -31,7 +31,7 @@
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
  */
 public class MiddleBedHeightGenerator
-extends      XYChartGenerator
+extends      LongitudinalSectionGenerator
 implements   FacetTypes
 {
     public enum YAXIS {
@@ -58,14 +58,10 @@
     public static final String I18N_CHART_SHORT_SUBTITLE =
         "chart.bedheight_middle.section.shortsubtitle";
 
-    public static final String I18N_XAXIS_LABEL =
-        "chart.bedheight_middle.section.xaxis.label";
-
     public static final String I18N_YAXIS_LABEL =
         "chart.bedheight_middle.section.yaxis.label";
 
     public static final String I18N_CHART_TITLE_DEFAULT  = "Mittlere Sohlhöhe";
-    public static final String I18N_XAXIS_LABEL_DEFAULT  = "km";
     public static final String I18N_YAXIS_LABEL_DEFAULT  = "mittlere Sohlhöhen [müNN]";
     public static final String I18N_W_YAXIS_LABEL =
         "chart.longitudinal.section.yaxis.label";
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixLongitudinalSectionGenerator.java	Fri Jun 28 20:36:51 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixLongitudinalSectionGenerator.java	Fri Jun 28 21:05:52 2013 +0200
@@ -55,7 +55,7 @@
             "Fixierungsanalyse";
 
     public static final String I18N_XAXIS_LABEL_DEFAULT  =
-            "[km]";
+            "km";
 
     public static final String I18N_DW_YAXIS_LABEL_DEFAULT  =
             "delta W [cm]";
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDiffHeightYearGenerator.java	Fri Jun 28 20:36:51 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDiffHeightYearGenerator.java	Fri Jun 28 21:05:52 2013 +0200
@@ -18,7 +18,7 @@
 import org.dive4elements.river.artifacts.model.minfo.BedDiffYearResult;
 import org.dive4elements.river.artifacts.model.minfo.BedDifferencesResult;
 import org.dive4elements.river.exports.StyledSeriesBuilder;
-import org.dive4elements.river.exports.fixings.FixChartGenerator;
+import org.dive4elements.river.exports.LongitudinalSectionGenerator;
 import org.dive4elements.river.exports.process.KMIndexProcessor;
 import org.dive4elements.river.exports.process.Processor;
 import org.dive4elements.river.jfree.Bounds;
@@ -28,7 +28,7 @@
 
 
 public class BedDiffHeightYearGenerator
-extends FixChartGenerator
+extends LongitudinalSectionGenerator
 implements FacetTypes
 {
     public enum YAXIS {
@@ -45,11 +45,9 @@
     private static Logger logger = Logger.getLogger(BedDiffHeightYearGenerator.class);
 
     public static final String I18N_CHART_TITLE = "chart.beddifference.height.title";
-    public static final String I18N_XAXIS_LABEL = "chart.beddifference.height.xaxis.label";
     public static final String I18N_YAXIS_LABEL = "chart.beddifference.height.yaxis.label";
 
     public static final String I18N_CHART_TITLE_DEFAULT = "Sohlenhöhen Differenz";
-    public static final String I18N_XAXIS_LABEL_DEFAULT = "Fluss-Km";
     public static final String I18N_YAXIS_LABEL_DEFAULT = "delta S [cm / Jahr]";
     public static final String I18N_DW_YAXIS_LABEL_DEFAULT  =
             "delta W [cm]";
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java	Fri Jun 28 20:36:51 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java	Fri Jun 28 21:05:52 2013 +0200
@@ -20,7 +20,7 @@
 import org.dive4elements.river.artifacts.model.WKms;
 import org.dive4elements.river.artifacts.model.minfo.BedDiffEpochResult;
 import org.dive4elements.river.exports.StyledSeriesBuilder;
-import org.dive4elements.river.exports.fixings.FixChartGenerator;
+import org.dive4elements.river.exports.LongitudinalSectionGenerator;
 import org.dive4elements.river.exports.process.KMIndexProcessor;
 import org.dive4elements.river.exports.process.Processor;
 import org.dive4elements.river.exports.process.WOutProcessor;
@@ -33,7 +33,7 @@
 
 
 public class BedDifferenceEpochGenerator
-extends FixChartGenerator
+extends LongitudinalSectionGenerator
 implements FacetTypes
 {
     public enum YAXIS {
@@ -50,12 +50,10 @@
     private static Logger logger = Logger.getLogger(BedQualityGenerator.class);
 
     public static final String I18N_CHART_TITLE = "chart.beddifference.epoch.title";
-    public static final String I18N_XAXIS_LABEL = "chart.beddifference.xaxis.label";
     public static final String I18N_YAXIS_LABEL = "chart.beddifference.yaxis.label.diff";
     public static final String I18N_SECOND_YAXIS_LABEL = "chart.beddifference.yaxis.label.height";
 
     public static final String I18N_CHART_TITLE_DEFAULT = "Sohlenhöhen Differenz";
-    public static final String I18N_XAXIS_LABEL_DEFAULT = "Fluss-Km";
     public static final String I18N_YAXIS_LABEL_DEFAULT = "delta S [m]";
     public static final String I18N_SECOND_YAXIS_LABEL_DEFAULT = "Höhe [m]";
     public static final String I18N_DW_YAXIS_LABEL_DEFAULT  =
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceYearGenerator.java	Fri Jun 28 20:36:51 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceYearGenerator.java	Fri Jun 28 21:05:52 2013 +0200
@@ -21,7 +21,7 @@
 import org.dive4elements.river.artifacts.model.minfo.BedDifferencesResult;
 import org.dive4elements.river.artifacts.model.minfo.MorphologicWidth;
 import org.dive4elements.river.exports.StyledSeriesBuilder;
-import org.dive4elements.river.exports.fixings.FixChartGenerator;
+import org.dive4elements.river.exports.LongitudinalSectionGenerator;
 import org.dive4elements.river.exports.process.KMIndexProcessor;
 import org.dive4elements.river.exports.process.Processor;
 import org.dive4elements.river.exports.process.WOutProcessor;
@@ -34,7 +34,7 @@
 
 
 public class BedDifferenceYearGenerator
-extends FixChartGenerator
+extends LongitudinalSectionGenerator
 implements FacetTypes
 {
     public enum YAXIS {
@@ -51,13 +51,11 @@
     private static Logger logger = Logger.getLogger(BedDifferenceYearGenerator.class);
 
     public static final String I18N_CHART_TITLE = "chart.beddifference.year.title";
-    public static final String I18N_XAXIS_LABEL = "chart.beddifference.xaxis.label";
     public static final String I18N_YAXIS_LABEL = "chart.beddifference.yaxis.label.diff";
     public static final String I18N_SECOND_YAXIS_LABEL = "chart.beddifference.yaxis.label.morph";
     public static final String I18N_THIRD_YAXIS_LABEL = "chart.beddifference.yaxis.label.heights";
 
     public static final String I18N_CHART_TITLE_DEFAULT = "Sohlenhöhen Differenz";
-    public static final String I18N_XAXIS_LABEL_DEFAULT = "Fluss-Km";
     public static final String I18N_YAXIS_LABEL_DEFAULT = "delta S [m]";
     public static final String I18N_SECOND_YAXIS_LABEL_DEFAULT = "Breite [m]";
     public static final String I18N_THIRD_YAXIS_LABEL_DEFAULT = "Höhe [m]";
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityGenerator.java	Fri Jun 28 20:36:51 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityGenerator.java	Fri Jun 28 21:05:52 2013 +0200
@@ -20,7 +20,7 @@
 import org.dive4elements.river.artifacts.model.minfo.BedParametersResult;
 import org.dive4elements.river.artifacts.model.minfo.BedloadDiameterResult;
 import org.dive4elements.river.exports.StyledSeriesBuilder;
-import org.dive4elements.river.exports.XYChartGenerator;
+import org.dive4elements.river.exports.LongitudinalSectionGenerator;
 import org.dive4elements.river.jfree.RiverAnnotation;
 import org.dive4elements.river.jfree.StyledXYSeries;
 
@@ -30,7 +30,7 @@
  *
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
  */
-public class BedQualityGenerator extends XYChartGenerator implements FacetTypes {
+public class BedQualityGenerator extends LongitudinalSectionGenerator implements FacetTypes {
 
     public enum YAXIS {
         W(0), P(1), D(2);
@@ -46,13 +46,11 @@
     private static Logger logger = Logger.getLogger(BedQualityGenerator.class);
 
     public static final String I18N_CHART_TITLE = "chart.bedquality.title";
-    public static final String I18N_XAXIS_LABEL = "chart.bedquality.xaxis.label";
     public static final String I18N_YAXIS_LABEL = "chart.bedquality.yaxis.label";
     public static final String I18N_SECOND_YAXIS_LABEL = "chart.bedquality.yaxis.label.porosity";
     public static final String I18N_THIRD_YAXIS_LABEL = "chart.bedquality.yaxis.label.diameter";
 
     public static final String I18N_CHART_TITLE_DEFAULT = "Sohlen Längsschnitt";
-    public static final String I18N_XAXIS_LABEL_DEFAULT = "Fluss-Km";
     public static final String I18N_YAXIS_LABEL_DEFAULT = "Durchmesser [mm]";
     public static final String I18N_SECOND_YAXIS_LABEL_DEFAULT = "Porosität [%]";
     public static final String I18N_THIRD_YAXIS_LABEL_DEFAULT = "Dichte [t/m^3]";
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadLSGenerator.java	Fri Jun 28 20:36:51 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadLSGenerator.java	Fri Jun 28 21:05:52 2013 +0200
@@ -28,7 +28,7 @@
 import org.dive4elements.river.artifacts.model.minfo.SedimentLoad;
 import org.dive4elements.river.artifacts.model.minfo.SedimentLoadFraction;
 import org.dive4elements.river.exports.StyledSeriesBuilder;
-import org.dive4elements.river.exports.XYChartGenerator;
+import org.dive4elements.river.exports.LongitudinalSectionGenerator;
 import org.dive4elements.river.jfree.Bounds;
 import org.dive4elements.river.jfree.DoubleBounds;
 import org.dive4elements.river.jfree.RiverAnnotation;
@@ -37,7 +37,7 @@
 
 
 public class SedimentLoadLSGenerator
-extends XYChartGenerator
+extends LongitudinalSectionGenerator
 implements FacetTypes
 {
     public enum YAXIS {
@@ -56,7 +56,6 @@
     private static Logger logger = Logger.getLogger(SedimentLoadLSGenerator.class);
 
     public static final String I18N_CHART_TITLE = "chart.sedimentload.ls.title";
-    public static final String I18N_XAXIS_LABEL = "chart.sedimentload.ls.xaxis.label";
     public static final String I18N_YAXIS_LABEL_1 = "chart.sedimentload.ls.yaxis.label.tpera";
     public static final String I18N_YAXIS_LABEL_2 = "chart.sedimentload.ls.yaxis.label.m3pera";
     public static final String I18N_YAXIS_D_LABEL = "chart.beddifference.yaxis.label.diff";
@@ -67,7 +66,6 @@
 
     public final static String I18N_WDIFF_YAXIS_LABEL_DEFAULT = "m";
     public static final String I18N_CHART_TITLE_DEFAULT = "Sedimentfracht";
-    public static final String I18N_XAXIS_LABEL_DEFAULT = "Fluss-Km";
     public static final String I18N_YAXIS_LABEL_DEFAULT_1 = "[t/a]";
     public static final String I18N_YAXIS_LABEL_DEFAULT_2 = "[m\u00b3/a]";
     public static final String I18N_YAXIS_D_LABEL_DEFAULT = "delta S [m]";
@@ -234,11 +232,6 @@
     }
 
     @Override
-    protected String getDefaultXAxisLabel() {
-        return msg(I18N_XAXIS_LABEL, I18N_XAXIS_LABEL_DEFAULT);
-    }
-
-    @Override
     protected String getDefaultYAxisLabel(int pos) {
         String label = "default";
         if (pos == YAXIS.L.idx) {

http://dive4elements.wald.intevation.org