changeset 3238:112c3f0fc075

Only show labels when activated in theme. flys-artifacts/trunk@4870 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 03 Jul 2012 19:30:08 +0000
parents 1cad94fa0817
children fb11bd37ddb8
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixDeltaWtGenerator.java
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Jul 03 17:51:52 2012 +0000
+++ b/flys-artifacts/ChangeLog	Tue Jul 03 19:30:08 2012 +0000
@@ -1,3 +1,9 @@
+2012-07-03	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/exports/fixings/FixDeltaWtGenerator.java:
+	  Only show labels if enabled in theme. Commented (failed) trials to get the
+	  text rotation right.
+
 2012-07-03	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/fixings/FixDeltaWtGenerator.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixDeltaWtGenerator.java	Tue Jul 03 17:51:52 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixDeltaWtGenerator.java	Tue Jul 03 19:30:08 2012 +0000
@@ -21,6 +21,7 @@
 import de.intevation.flys.jfree.StyledTimeSeries;
 
 import de.intevation.flys.utils.FLYSUtils;
+import de.intevation.flys.utils.ThemeUtil;
 
 import java.awt.BasicStroke;
 import java.awt.Color;
@@ -52,6 +53,8 @@
 import org.jfree.data.time.TimeSeries;
 import org.jfree.data.time.TimeSeriesCollection;
 
+//import org.jfree.ui.TextAnchor;
+
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -309,6 +312,8 @@
     protected void doQWDTextAnnotations(Map<Integer, int[]> annoIdxMap,
             TimeSeriesCollection tsc, QWD[] qwds, Document theme,
             boolean visible) {
+        if (!ThemeUtil.parseShowLineLabel(theme))
+            return;
         List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>();
         Set<Map.Entry<Integer, int[]>> entries = annoIdxMap.entrySet();
         for(Map.Entry<Integer, int[]> entry : entries) {
@@ -319,6 +324,8 @@
                 qwd.getQ() + " m\u00B3/s",
                 x,
                 qwd.getDeltaW());
+            //anno.setRotationAngle(200f*Math.PI/180f);
+            //anno.setRotationAnchor(TextAnchor.CENTER_LEFT);
             textAnnos.add(anno);
             logger.debug("annotation: " + x + "/" + qwd.getDeltaW());
         }

http://dive4elements.wald.intevation.org