changeset 4445:0eca080fc162

Move inverted from LongitudinalSectionGenerator to XYChartGenerator
author Björn Ricks <bjoern.ricks@intevation.de>
date Wed, 07 Nov 2012 14:22:54 +0100
parents 47d50572844a
children 05a54b4d579d
files flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java
diffstat 2 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Wed Nov 07 14:12:39 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Wed Nov 07 14:22:54 2012 +0100
@@ -90,10 +90,6 @@
 
     public final static String I18N_WDIFF_YAXIS_LABEL_DEFAULT = "m";
 
-    /** Whether or not the plot is inverted (left-right). */
-    protected boolean inverted;
-
-
     public LongitudinalSectionGenerator() {
         super();
     }
@@ -116,17 +112,6 @@
     }
 
 
-    /** True if x axis has been inverted. */
-    public boolean isInverted() {
-        return inverted;
-    }
-
-
-    /** Set to true if x axis has been inverted. */
-    public void setInverted(boolean inverted) {
-        this.inverted = inverted;
-    }
-
     /**
      * Return left most data points x value (on first axis).
      * Overridden because axis could be inverted.
@@ -308,7 +293,7 @@
      * @param xaxis The domain axis.
      */
     protected void invertXAxis(ValueAxis xaxis) {
-        if (inverted) {
+        if (isInverted()) {
             logger.debug("X-Axis.setInverted(true)");
             xaxis.setInverted(true);
         }
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Wed Nov 07 14:12:39 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Wed Nov 07 14:22:54 2012 +0100
@@ -184,6 +184,9 @@
     /** The max Y range to include all Y values of all series for each axis. */
     protected Map<Integer, Bounds> yBounds;
 
+    /** Whether or not the plot is inverted (left-right). */
+    private boolean inverted;
+
     public XYChartGenerator() {
         super();
 
@@ -1035,5 +1038,17 @@
         return hash;
     }
 
+    /** True if x axis has been inverted. */
+    public boolean isInverted() {
+        return inverted;
+    }
+
+
+    /** Set to true if x axis has been inverted. */
+    public void setInverted(boolean inverted) {
+        this.inverted = inverted;
+    }
+
+
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org