changeset 1750:415ec0223dff

Renamed text background attribute and parse text attributes correctly. flys-artifacts/trunk@3052 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 21 Oct 2011 08:19:26 +0000
parents f7d890f4855f
children 27b8836abec9
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/themes.xml flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java
diffstat 3 files changed, 21 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu Oct 20 17:14:24 2011 +0000
+++ b/flys-artifacts/ChangeLog	Fri Oct 21 08:19:26 2011 +0000
@@ -1,3 +1,12 @@
+2011-10-21  Raimund Renkert <raimund.renkert@intevation.de>
+
+	* doc/conf/themes.xml:
+	  Renamed 'textbackground' to 'backgroundcolor' to have 'color' in the
+	  attribute name.
+
+	* src/main/java/de/intevation/flys/utils/ThemeUtil.java:
+	  Process text attributes correctly.
+
 2011-10-20	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/services/CrossSectionKMService.java:
--- a/flys-artifacts/doc/conf/themes.xml	Thu Oct 20 17:14:24 2011 +0000
+++ b/flys-artifacts/doc/conf/themes.xml	Fri Oct 21 08:19:26 2011 +0000
@@ -525,9 +525,9 @@
 
     <theme name="AnnotationText" type="virtual">
         <fields>
-            <field name="textbackground"  type="Color"   display="Texthintergrund"      default="255, 255, 255"/>
-            <field name="textorientation" type="boolean" display="Textausrichtung"      default="false"/>
-            <field name="showbackground"  type="boolean" display="Hintergrund anzeigen" default="false"/>
+            <field name="backgroundcolor"  type="Color"   display="Texthintergrund"      default="255, 255, 255"/>
+            <field name="textorientation"  type="boolean" display="Textausrichtung"      default="false"/>
+            <field name="showbackground"   type="boolean" display="Hintergrund anzeigen" default="false"/>
         </fields>
     </theme>
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java	Thu Oct 20 17:14:24 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java	Fri Oct 21 08:19:26 2011 +0000
@@ -43,7 +43,7 @@
         "/theme/field[@name='textorientation']/@default";
 
     public final static String XPATH_TEXT_BACKGROUND =
-        "/theme/field[@name='textbackground']/@default";
+        "/theme/field[@name='backgroundcolor']/@default";
 
     public final static String XPATH_SHOW_BACKGROUND =
         "/theme/field[@name='showbackground']/@default";
@@ -126,7 +126,8 @@
         }
 
         int size = parseTextSize(theme);
-        Font f = new Font (font, 0, size);
+        int style = parseTextStyle(theme);
+        Font f = new Font (font, style, size);
         return f;
     }
 
@@ -162,7 +163,12 @@
         if (o == null || o.length() == 0) {
             return "vertical";
         }
-        return o;
+        if(o.equals("true")) {
+            return "horizontal";
+        }
+        else {
+            return "vertical";
+        }
     }
 
 

http://dive4elements.wald.intevation.org