diff artifacts/src/main/java/org/dive4elements/river/exports/DiagramAttributes.java @ 7122:038a04e001d7

Handle multiple processors for axis labeling. It now looks for the first processor that provides a label != null
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 24 Sep 2013 18:35:21 +0200
parents 24f153ad1f40
children 053e39436ba3
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramAttributes.java	Tue Sep 24 18:33:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramAttributes.java	Tue Sep 24 18:35:21 2013 +0200
@@ -50,14 +50,15 @@
             return processors;
         }
 
-        public Processor getProcessorForAxisName(String axisName) {
+        public List<Processor> getProcessorsForAxisName(String axisName) {
+            List<Processor> retval = new ArrayList<Processor>(5);
             for (Processor pr: processors) {
                 String aName = pr.getAxisName();
                 if (aName != null && axisName.equals(aName)) {
-                    return pr;
+                    retval.add(pr);
                 }
             }
-            return null;
+            return retval;
         }
 
         public List<Processor> getProcessors() {

http://dive4elements.wald.intevation.org