comparison flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java @ 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 d56b94325bec
children 741ba9e34c7d
comparison
equal deleted inserted replaced
1749:f7d890f4855f 1750:415ec0223dff
41 41
42 public final static String XPATH_TEXT_ORIENTATION = 42 public final static String XPATH_TEXT_ORIENTATION =
43 "/theme/field[@name='textorientation']/@default"; 43 "/theme/field[@name='textorientation']/@default";
44 44
45 public final static String XPATH_TEXT_BACKGROUND = 45 public final static String XPATH_TEXT_BACKGROUND =
46 "/theme/field[@name='textbackground']/@default"; 46 "/theme/field[@name='backgroundcolor']/@default";
47 47
48 public final static String XPATH_SHOW_BACKGROUND = 48 public final static String XPATH_SHOW_BACKGROUND =
49 "/theme/field[@name='showbackground']/@default"; 49 "/theme/field[@name='showbackground']/@default";
50 50
51 /** 51 /**
124 if (font == null || font.length() == 0) { 124 if (font == null || font.length() == 0) {
125 return null; 125 return null;
126 } 126 }
127 127
128 int size = parseTextSize(theme); 128 int size = parseTextSize(theme);
129 Font f = new Font (font, 0, size); 129 int style = parseTextStyle(theme);
130 Font f = new Font (font, style, size);
130 return f; 131 return f;
131 } 132 }
132 133
133 134
134 /** 135 /**
160 public static String parseTextOrientation(Document theme) { 161 public static String parseTextOrientation(Document theme) {
161 String o = XMLUtils.xpathString(theme, XPATH_TEXT_ORIENTATION, null); 162 String o = XMLUtils.xpathString(theme, XPATH_TEXT_ORIENTATION, null);
162 if (o == null || o.length() == 0) { 163 if (o == null || o.length() == 0) {
163 return "vertical"; 164 return "vertical";
164 } 165 }
165 return o; 166 if(o.equals("true")) {
167 return "horizontal";
168 }
169 else {
170 return "vertical";
171 }
166 } 172 }
167 173
168 174
169 /** 175 /**
170 * Parses the text background color, defaults to white. 176 * Parses the text background color, defaults to white.

http://dive4elements.wald.intevation.org