comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedHeightFacet.java @ 3614:68beaa827751

MINFO: Implemented UI and facet/artifact stack for bed height differences. flys-artifacts/trunk@5276 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 28 Aug 2012 11:45:23 +0000
parents
children ebfce31c7eec
comparison
equal deleted inserted replaced
3613:dd6e25980c91 3614:68beaa827751
1 package de.intevation.flys.artifacts.model.minfo;
2
3 import de.intevation.artifacts.Artifact;
4 import de.intevation.artifacts.CallContext;
5 import de.intevation.flys.artifacts.BedHeightsArtifact;
6 import de.intevation.flys.artifacts.model.BlackboardDataFacet;
7 import de.intevation.flys.artifacts.model.FacetTypes;
8
9 public class BedHeightFacet
10 extends BlackboardDataFacet
11 implements FacetTypes {
12
13 public BedHeightFacet(String description) {
14 this(STATIC_BEDHEIGHT, description);
15 }
16
17 public BedHeightFacet(String name, String description) {
18 this.name = name;
19 this.description = description;
20 this.index = 0;
21 }
22
23 /**
24 * Returns the data this facet requires.
25 *
26 * @param artifact the owner artifact.
27 * @param context the CallContext (ignored).
28 *
29 * @return the data.
30 */
31 @Override
32 public Object getData(Artifact artifact, CallContext context) {
33 BedHeightsArtifact staticData =
34 (BedHeightsArtifact) artifact;
35 return staticData.getHeight();
36 }
37 /**
38 * Create a deep copy of this Facet.
39 * @return a deep copy.
40 */
41 @Override
42 public BedHeightFacet deepCopy() {
43 BedHeightFacet copy = new BedHeightFacet(description);
44 copy.set(this);
45 return copy;
46 }
47 }
48 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org