comparison flys-artifacts/src/main/java/de/intevation/flys/exports/IntegerAttribute.java @ 1990:5c1e7c1e9e09

Improved the ChartSettings returned by charts - it now contains a legend specific section. flys-artifacts/trunk@3426 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 15 Dec 2011 15:58:56 +0000
parents
children 58bdf95df5e4
comparison
equal deleted inserted replaced
1989:156304542edf 1990:5c1e7c1e9e09
1 package de.intevation.flys.exports;
2
3 import org.w3c.dom.Document;
4 import org.w3c.dom.Element;
5 import org.w3c.dom.Node;
6
7
8 /**
9 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
10 */
11 public class IntegerAttribute extends VisibleAttribute {
12
13
14 public IntegerAttribute(String name, int value, boolean visible) {
15 super(name, value, visible);
16 }
17
18
19 /**
20 * Calls VisibleAttribute.toXML() and appends afterwards an attribute
21 * <i>type</i> with value <i>integer</i>.
22 *
23 * @param parent The parent Node.
24 *
25 * @return the new Node that represents this Attribute.
26 */
27 @Override
28 public Node toXML(Node parent) {
29 Document owner = parent.getOwnerDocument();
30
31 Element ele = (Element) super.toXML(parent);
32 ele.setAttribute("type", "integer");
33
34 return ele;
35 }
36 }
37 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org