diff artifacts/src/main/java/org/dive4elements/river/jfree/StyledDomainMarker.java @ 6908:819481cc9195

Artifacts: ThemeDocument. The bloody part: Removal of the XPaths. Now the theme XML document is scanned once(!) at construction time for field values and the resulting key/value pairs are store in a map.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 23 Aug 2013 11:07:11 +0200
parents 1b35b2ddfc28
children
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/StyledDomainMarker.java	Fri Aug 23 01:17:13 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/jfree/StyledDomainMarker.java	Fri Aug 23 11:07:11 2013 +0200
@@ -28,16 +28,14 @@
     public StyledDomainMarker(double start, double end, ThemeDocument theme) {
         super(start, end);
 
-        backgroundColor = ThemeDocument.parseColor(
-                theme.getAreaBackgroundColorString());
+        backgroundColor = theme.parseAreaBackgroundColor();
         backgroundColor2 = new Color(
             255 - backgroundColor.getRed(),
             255 - backgroundColor.getGreen(),
             255 - backgroundColor.getBlue());
         useSecondColor(false);
 
-        int alpha = 100 - ThemeDocument.parseInteger(
-                theme.getAreaTransparencyString(), 50);
+        int alpha = 100 - theme.parseAreaTransparency(50);
         setAlpha(alpha / 100.0f);
     }
 

http://dive4elements.wald.intevation.org