Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/server/CollectionItemAttributeServiceImpl.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 | 4a6814be92ba |
children | 7a94d5e7fc3d |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/CollectionItemAttributeServiceImpl.java Mon Jun 18 08:44:52 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/CollectionItemAttributeServiceImpl.java Mon Jun 18 11:17:29 2012 +0000 @@ -137,7 +137,7 @@ NodeList items = e.getElementsByTagName("theme"); for (int i = 0; i < items.getLength(); i++) { - Style s = getStyle ((Element) items.item(i)); + Style s = StyleHelper.getStyle ((Element) items.item(i)); if(s == null) { throw new ServerException(ERROR_NO_STYLES_FOUND); } @@ -198,37 +198,5 @@ styles.appendChild(action); return styles; } - - - 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 :