[Dive4elements-commits] [PATCH 09 of 13] Move inverted from LongitudinalSectionGenerator to XYChartGenerator

Wald Commits scm-commit at wald.intevation.org
Wed Nov 7 15:58:43 CET 2012


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1352294574 -3600
# Node ID 0eca080fc16276700b0c19d8c278a86d0fbbb04a
# Parent  47d50572844aec6f2b2a370dc5cbed79550ed82f
Move inverted from LongitudinalSectionGenerator to XYChartGenerator

diff -r 47d50572844a -r 0eca080fc162 flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java
--- 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);
         }
diff -r 47d50572844a -r 0eca080fc162 flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java
--- 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 :


More information about the Dive4elements-commits mailing list