Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FunctionSelect.java @ 5831:bd047b71ab37
Repaired internal references
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 12:06:39 +0200 |
parents | flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FunctionSelect.java@8e66293c5369 |
children |
comparison
equal
deleted
inserted
replaced
5830:160f53ee0870 | 5831:bd047b71ab37 |
---|---|
1 package org.dive4elements.river.artifacts.states.fixation; | |
2 | |
3 import java.util.Collection; | |
4 | |
5 import org.w3c.dom.Element; | |
6 | |
7 import org.dive4elements.artifacts.Artifact; | |
8 import org.dive4elements.artifacts.CallContext; | |
9 import org.dive4elements.artifacts.common.utils.XMLUtils; | |
10 import org.dive4elements.river.artifacts.math.fitting.Function; | |
11 import org.dive4elements.river.artifacts.math.fitting.FunctionFactory; | |
12 import org.dive4elements.river.artifacts.states.DefaultState; | |
13 | |
14 /** | |
15 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> | |
16 */ | |
17 public class FunctionSelect extends DefaultState { | |
18 | |
19 /** | |
20 * The default constructor that initializes an empty State object. | |
21 */ | |
22 public FunctionSelect() { | |
23 } | |
24 | |
25 @Override | |
26 public String getUIProvider() { | |
27 return "fix.functionselect"; | |
28 } | |
29 | |
30 @Override | |
31 protected Element[] createItems( | |
32 XMLUtils.ElementCreator ec, | |
33 Artifact artifact, | |
34 String name, | |
35 CallContext context) | |
36 { | |
37 FunctionFactory ff = FunctionFactory.getInstance(); | |
38 Collection<Function> fc = ff.getFunctions(); | |
39 Element[] functions = new Element[fc.size()]; | |
40 | |
41 int j = 0; | |
42 for (Function f: fc) { | |
43 String n = f.getName(); | |
44 String d = f.getDescription(); | |
45 functions[j] = createItem(ec, new String[] {d, n}); | |
46 j++; | |
47 } | |
48 | |
49 return functions; | |
50 } | |
51 } | |
52 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |