[PATCH 1 of 3] Remove generator2 hacks

Wald Commits scm-commit at wald.intevation.org
Fri Sep 20 19:18:08 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1379692710 -7200
# Branch generator-refactoring
# Node ID 3dc740c51f9be5ef652effb8c9af5c8cbac3a8f5
# Parent  3c4efd4b2c1938f748135a2311da34f58cc0c36a
Remove generator2 hacks

diff -r 3c4efd4b2c19 -r 3dc740c51f9b artifacts/src/main/java/org/dive4elements/river/exports/InfoGeneratorHelper.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/InfoGeneratorHelper.java	Fri Sep 20 17:36:11 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/InfoGeneratorHelper.java	Fri Sep 20 17:58:30 2013 +0200
@@ -47,18 +47,11 @@
         Logger.getLogger(InfoGeneratorHelper.class);
 
     protected ChartGenerator generator;
-    protected ChartGenerator2 generator2;
-
 
     public InfoGeneratorHelper(ChartGenerator generator) {
         this.generator = generator;
     }
 
-    public InfoGeneratorHelper(ChartGenerator2 generator) {
-        this.generator2 = generator2;
-    }
-
-
     /**
      * Triggers the creation of the chart info document.
      *
@@ -191,7 +184,7 @@
         cr.addAttr(e, "to",   String.valueOf(range.getUpperBound()), true);
         cr.addAttr(e, "axistype", "number", true);
 
-        Range[] rs = generator2 == null ? generator.getRangesForAxis(pos) : generator2.getRangesForAxis(pos);
+        Range[] rs = generator.getRangesForAxis(pos);
         Range   r  = null;
 
         if (type.equals("range")) {
@@ -221,10 +214,10 @@
 
         Bounds bounds = null;
         if (type.equals("range")) {
-            bounds = generator2 == null ? generator.getYBounds(pos) : generator2.getYBounds(pos);
+            bounds = generator.getYBounds(pos);
         }
         else {
-            bounds = generator2 == null ? generator.getXBounds(pos) : generator2.getXBounds(pos);
+            bounds = generator.getXBounds(pos);
         }
 
         cr.addAttr(e, "axistype", "date", true);


More information about the Dive4elements-commits mailing list