diff flys-artifacts/src/main/java/de/intevation/flys/jfree/XYStyle.java @ 2662:bdc86e61428c

Respect show line label bg setting. flys-artifacts/trunk@4337 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 03 May 2012 07:48:12 +0000
parents 1a044c51abe4
children 22def36d37b7
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/XYStyle.java	Thu May 03 05:59:52 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/XYStyle.java	Thu May 03 07:48:12 2012 +0000
@@ -42,6 +42,7 @@
         applyShowLineLabel(r, idx);
         applyLineLabelFont(r, idx);
         applyLineLabelColor(r, idx);
+        applyShowLineLabelBG(r, idx);
         applyLineLabelBGColor(r, idx);
 
         return r;
@@ -65,6 +66,15 @@
     }
 
 
+    /** Tells the renderer whether or not to fill the bg of a lines label. */
+    protected void applyShowLineLabelBG(XYLineAndShapeRenderer r, int idx) {
+        if (!(r instanceof EnhancedLineAndShapeRenderer)) {
+            return;
+        }
+        boolean showLabelLine = ThemeUtil.parseShowLineLabelBG(theme);
+        ((EnhancedLineAndShapeRenderer)r).setShowLineLabelBG(idx, showLabelLine);
+    }
+
     /** Tell the renderer which font (and -size and -style) to use for
      * linelabels. */
     protected void applyLineLabelFont(XYLineAndShapeRenderer r, int idx) {

http://dive4elements.wald.intevation.org