diff flys-artifacts/src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java @ 1754:8e6615ad60b8

Added some simple caching for themes. Only used in sticky annotations by now. flys-artifacts/trunk@3057 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 21 Oct 2011 15:19:49 +0000
parents 741ba9e34c7d
children c51089a84d13
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java	Fri Oct 21 14:02:07 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java	Fri Oct 21 15:19:49 2011 +0000
@@ -4,8 +4,6 @@
 
 import java.util.Iterator;
 
-import org.w3c.dom.Document;
-
 import java.awt.Shape;
 import java.awt.geom.Rectangle2D;
 import java.awt.geom.Line2D;
@@ -30,7 +28,7 @@
 import org.jfree.ui.RectangleEdge;
 import org.jfree.ui.TextAnchor;
 
-import de.intevation.flys.utils.ThemeUtil;
+import de.intevation.flys.utils.ThemeAccess;
 
 /**
  * Custom Annotations class that is drawn only if no collisions with other
@@ -346,14 +344,14 @@
     }
 
 
-    public void applyTheme(Document theme) {
-        lineWidth = ThemeUtil.parseLineWidth(theme);
-        lineColor = ThemeUtil.parseLineColorField(theme);
-        textColor = ThemeUtil.parseTextColor(theme);
-        font = ThemeUtil.parseTextFont(theme);
-        textOrientation = ThemeUtil.parseTextOrientation(theme);
-        textBackground = ThemeUtil.parseTextBackground(theme);
-        showBackground = ThemeUtil.parseShowTextBackground(theme);
+    public void applyTheme(ThemeAccess ta) {
+        lineWidth       = ta.parseLineWidth();
+        lineColor       = ta.parseLineColorField();
+        textColor       = ta.parseTextColor();
+        font            = ta.parseTextFont();
+        textOrientation = ta.parseTextOrientation();
+        textBackground  = ta.parseTextBackground();
+        showBackground  = ta.parseShowTextBackground();
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org