comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java @ 1729:2e5ebdeb8af9

Give StaticWKmsArtifacts proper names, and pre-deselect them. flys-artifacts/trunk@3013 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 18 Oct 2011 15:00:43 +0000
parents e3b9164a85fe
children f7d890f4855f
comparison
equal deleted inserted replaced
1728:6068b6c90a19 1729:2e5ebdeb8af9
90 if (code != null) { 90 if (code != null) {
91 String [] parts = code.split("-"); 91 String [] parts = code.split("-");
92 92
93 if (parts.length >= 4) { 93 if (parts.length >= 4) {
94 try { 94 try {
95 Integer.valueOf(parts[2]); 95 int col = Integer.valueOf(parts[2]);
96 Integer.valueOf(parts[3]); 96 int wst = Integer.valueOf(parts[3]);
97
97 addStringData("col_pos", parts[2]); 98 addStringData("col_pos", parts[2]);
98 addStringData("wst_id", parts[3]); 99 addStringData("wst_id", parts[3]);
100
101 String wkmsName = WKmsFactory.getWKmsName(col, wst);
102
103 Facet facet = new WKmsFacet(
104 Resources.getMsg(
105 callMeta,
106 wkmsName,
107 wkmsName));
108
109 fs.add(facet);
110 facets.put(state.getID(), fs);
111
99 } 112 }
100 catch (Exception e) {} 113 catch (Exception e) {}
101 } 114 }
102 } 115 }
103
104 Facet facet = new WKmsFacet(Resources.getMsg(callMeta,
105 "facet.discharge_curves.mainvalues.w",
106 "facet.discharge_curves.mainvalues.w"));
107 fs.add(facet);
108 facets.put(state.getID(), fs);
109 116
110 spawnState(); 117 spawnState();
111 super.setup(identifier, factory, context, callMeta, data); 118 super.setup(identifier, factory, context, callMeta, data);
112 } 119 }
113 120
203 210
204 return WKmsFactory.getWKms( 211 return WKmsFactory.getWKms(
205 Integer.valueOf(getDataAsString("col_pos")), 212 Integer.valueOf(getDataAsString("col_pos")),
206 Integer.valueOf(getDataAsString("wst_id"))); 213 Integer.valueOf(getDataAsString("wst_id")));
207 } 214 }
215
216
217 /**
218 * Determines Facets initial disposition regarding activity (think of
219 * selection in Client ThemeList GUI). This will be checked one time
220 * when the facet enters a collections describe document.
221 *
222 * @param facetName name of the facet.
223 * @param index index of the facet.
224 *
225 * @return Always 0. Static Data will enter plots inactive.
226 */
227 public int getInitialFacetActivity(String facetName, int index) {
228 return 0;
229 }
230
208 } 231 }
209 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : 232 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org