Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/exports/DoubleAttribute.java @ 2089:0da8874bd378
Added initial state to map artifact to be able to advance and step back.
The map artifact overrides describe() to have the complete UI information in the
describe response document.
flys-artifacts/trunk@3613 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 06 Jan 2012 12:02:10 +0000 |
parents | e1c9f28e2675 |
children | 58bdf95df5e4 |
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.Document; |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import org.w3c.dom.Element; |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import org.w3c.dom.Node; |
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 /** |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 * @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
|
10 */ |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 public class DoubleAttribute extends VisibleAttribute { |
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 |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 public DoubleAttribute(String name, double value, boolean visible) { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 super(name, value, visible); |
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 /** |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 * Calls VisibleAttribute.toXML() and appends afterwards an attribute |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 * <i>type</i> with value <i>double</i>. |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 * |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 * @param parent The parent Node. |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 * |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 * @return the new Node that represents this Attribute. |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 */ |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 @Override |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 public Node toXML(Node parent) { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 Document owner = parent.getOwnerDocument(); |
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 Element ele = (Element) super.toXML(parent); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 ele.setAttribute("type", "double"); |
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 return ele; |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |