comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java @ 2885:6ab6025cef20

Removed some debug outputs. flys-client/trunk@4568 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 01 Jun 2012 10:47:34 +0000
parents 88bca9f735c0
children 6e4e4b96ca6c
comparison
equal deleted inserted replaced
2884:88bca9f735c0 2885:6ab6025cef20
79 protected Tab chart; 79 protected Tab chart;
80 protected VLayout chartContainer; 80 protected VLayout chartContainer;
81 protected Img chartImg; 81 protected Img chartImg;
82 82
83 public FixationPanel() { 83 public FixationPanel() {
84 GWT.log("new filter");
85 chartImg = new Img(); 84 chartImg = new Img();
86 htmlOverview = ""; 85 htmlOverview = "";
87 } 86 }
88 87
89 protected String getArtifactUuid() { 88 protected String getArtifactUuid() {
142 Filter example. 141 Filter example.
143 {"fixings": "river": { "name": "Elbe"}, "range": {"from": 1, "to": 200}, "filter": {"and": { "column": {"cid": 1}, "column": {"cid": 2} } }} 142 {"fixings": "river": { "name": "Elbe"}, "range": {"from": 1, "to": 200}, "filter": {"and": { "column": {"cid": 1}, "column": {"cid": 2} } }}
144 */ 143 */
145 String callBack = "fixationCallback(this.checked, this.name)"; 144 String callBack = "fixationCallback(this.checked, this.name)";
146 FixAnalysisArtifact art = (FixAnalysisArtifact) this.artifact; 145 FixAnalysisArtifact art = (FixAnalysisArtifact) this.artifact;
147
148 GWT.log(art.getFilter().getOverviewFilter());
149 146
150 overviewService.generateOverview( 147 overviewService.generateOverview(
151 locale, 148 locale,
152 artifact.getUuid(), 149 artifact.getUuid(),
153 art.getFilter().getOverviewFilter(), 150 art.getFilter().getOverviewFilter(),
240 protected void updateChartTab(double km) { 237 protected void updateChartTab(double km) {
241 Config config = Config.getInstance(); 238 Config config = Config.getInstance();
242 String locale = config.getLocale (); 239 String locale = config.getLocale ();
243 240
244 FixAnalysisArtifact art = (FixAnalysisArtifact) this.artifact; 241 FixAnalysisArtifact art = (FixAnalysisArtifact) this.artifact;
245 GWT.log("km: " + km);
246 if (km < 0) { 242 if (km < 0) {
247 km = 0; 243 km = 0;
248 } 244 }
249 GWT.log("km: " + km);
250 art.getFilter().setCurrentKm(km); 245 art.getFilter().setCurrentKm(km);
251 if (chartContainer.hasMember(chartImg)) { 246 if (chartContainer.hasMember(chartImg)) {
252 chartContainer.removeMember(chartImg); 247 chartContainer.removeMember(chartImg);
253 } 248 }
254 String imgUrl = GWT.getModuleBaseURL(); 249 String imgUrl = GWT.getModuleBaseURL();
429 JSONObject jrName = new JSONObject(); 424 JSONObject jrName = new JSONObject();
430 JSONString jrValue = new JSONString(river); 425 JSONString jrValue = new JSONString(river);
431 jrName.put("name", jrValue); 426 jrName.put("name", jrValue);
432 jfilter.put("river", jrName); 427 jfilter.put("river", jrName);
433 jfix.put("fixings", createFilter(jfilter)); 428 jfix.put("fixings", createFilter(jfilter));
434 GWT.log("filter: " + jfix.toString());
435 return jfix.toString(); 429 return jfix.toString();
436 } 430 }
437 return ""; 431 return "";
438 } 432 }
439 433
440 public String getChartFilter(int width, int height) { 434 public String getChartFilter(int width, int height) {
441 if (river != null && river.length() > 0 && 435 if (river != null && river.length() > 0 &&
442 currentKm >= fromKm && currentKm <= toKm) 436 currentKm >= fromKm && currentKm <= toKm)
443 { 437 {
444 GWT.log("current: " + currentKm);
445 JSONObject jfix = new JSONObject(); 438 JSONObject jfix = new JSONObject();
446 JSONObject jfilter = new JSONObject(); 439 JSONObject jfilter = new JSONObject();
447 JSONObject jrName = new JSONObject(); 440 JSONObject jrName = new JSONObject();
448 JSONString jrValue = new JSONString(river); 441 JSONString jrValue = new JSONString(river);
449 JSONObject jkm = new JSONObject(); 442 JSONObject jkm = new JSONObject();
458 jfilter.put("km", jkm); 451 jfilter.put("km", jkm);
459 jextent.put("width", jwidth); 452 jextent.put("width", jwidth);
460 jextent.put("height", jheight); 453 jextent.put("height", jheight);
461 jfilter.put("extent", jextent); 454 jfilter.put("extent", jextent);
462 jfix.put("fixings", createFilter(jfilter)); 455 jfix.put("fixings", createFilter(jfilter));
463 GWT.log("filter: " + jfix.toString());
464 return jfix.toString(); 456 return jfix.toString();
465 } 457 }
466 return ""; 458 return "";
467 } 459 }
468 460
469 protected JSONObject createFilter(JSONObject root) { 461 protected JSONObject createFilter(JSONObject root) {
470 GWT.log("km:" + fromKm + ", " + toKm);
471 if (this.fromKm >= 0 && this.toKm >= 0 && this.fromKm <=this.toKm) { 462 if (this.fromKm >= 0 && this.toKm >= 0 && this.fromKm <=this.toKm) {
472 JSONObject range = new JSONObject(); 463 JSONObject range = new JSONObject();
473 JSONObject fromtokm = new JSONObject(); 464 JSONObject fromtokm = new JSONObject();
474 JSONNumber f = new JSONNumber(this.fromKm); 465 JSONNumber f = new JSONNumber(this.fromKm);
475 JSONNumber t = new JSONNumber(this.toKm); 466 JSONNumber t = new JSONNumber(this.toKm);

http://dive4elements.wald.intevation.org