annotate flys-artifacts/src/main/java/de/intevation/flys/exports/DoubleAttribute.java @ 4255:670e98f5a441

Fixed leak while merging facets. The ThemeList that is used by OutputHelper to sort the Facets for an Output now uses a list to store the ManagedFacets. The correct order is made up by sorting the List using Collections.sort() function of the Java JDK. Therfore, the ManagedFacet class implements the Comparable interface. The return value of its compareTo(other) method depends on the value of the 'position' field.
author Ingo Weinzierl <weinzierl.ingo@googlemail.com>
date Thu, 25 Oct 2012 14:01:46 +0200
parents 58bdf95df5e4
children
rev   line source
1992
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.exports;
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import org.w3c.dom.Element;
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 import org.w3c.dom.Node;
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 /**
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 */
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 public class DoubleAttribute extends VisibleAttribute {
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 public DoubleAttribute(String name, double value, boolean visible) {
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 super(name, value, visible);
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 }
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18 /**
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19 * Calls VisibleAttribute.toXML() and appends afterwards an attribute
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20 * <i>type</i> with value <i>double</i>.
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 *
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 * @param parent The parent Node.
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 *
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 * @return the new Node that represents this Attribute.
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 */
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 @Override
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27 public Node toXML(Node parent) {
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 Element ele = (Element) super.toXML(parent);
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 ele.setAttribute("type", "double");
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 return ele;
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 }
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 }
e1c9f28e2675 Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org