Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/server/ThemeListingServiceImpl.java @ 2908:cd068ff7966d
Show only style attributes in StyleEditorWindow that are not 'hidden'.
flys-client/trunk@4685 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 18 Jun 2012 11:17:29 +0000 |
parents | e75b15818435 |
children | 37dce0f2f63b |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/ThemeListingServiceImpl.java Mon Jun 18 08:44:52 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/ThemeListingServiceImpl.java Mon Jun 18 11:17:29 2012 +0000 @@ -90,7 +90,7 @@ for (int j = 0; j < theTheme.getLength(); j++) { Element elem = (Element) theTheme.item(j); - theStyles.put(groupName, getStyle(elem)); + theStyles.put(groupName, StyleHelper.getStyle(elem)); } } @@ -102,38 +102,5 @@ throw new ServerException(ERROR_NO_GROUPS_FOUND); } - - - protected Style getStyle (Element element) { - if (!element.getTagName().equals("theme")) { - return null; - } - - NodeList list = element.getElementsByTagName("field"); - Style style = new Style(); - - style.setName (element.getAttribute("name")); - style.setFacet (element.getAttribute("facet")); - - try { - int ndx = Integer.parseInt(element.getAttribute("index")); - style.setIndex (ndx); - } - catch(NumberFormatException nfe) { - return null; - } - - for(int i = 0; i < list.getLength(); i++) { - Element e = (Element) list.item(i); - StyleSetting set = new StyleSetting ( - e.getAttribute("name"), - e.getAttribute("default"), - e.getAttribute("display"), - e.getAttribute("hints"), - e.getAttribute("type")); - style.appendStyleSetting(set); - } - return style; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :