comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java @ 2526:a911e2968cb1

Changed some data types in states and filter and added new preprocessing state to ui provider factory. flys-client/trunk@4415 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 15 May 2012 15:33:43 +0000
parents 8f528f5ae137
children cc5969df0490
comparison
equal deleted inserted replaced
2525:da1d897ed66d 2526:a911e2968cb1
126 chart.setPane(layout); 126 chart.setPane(layout);
127 127
128 final HTMLPane eventPane = new HTMLPane(); 128 final HTMLPane eventPane = new HTMLPane();
129 129
130 String river = artifact.getArtifactDescription().getRiver(); 130 String river = artifact.getArtifactDescription().getRiver();
131 131 fixFilter.setRiver(river);
132 createCallback(); 132 createCallback();
133 /* 133 /*
134 Filter example. 134 Filter example.
135 {"fixings": { "river": { "name": "Elbe"}, "range": {"from": 1, "to": 200}, "filter": {"and": { "column": {"cid": 1}, "column": {"cid": 2} } }} 135 {"fixings": { "river": { "name": "Elbe"}, "range": {"from": 1, "to": 200}, "filter": {"and": { "column": {"cid": 1}, "column": {"cid": 2} } }}
136 */ 136 */
137 String callBack = "fixationCallback(this.checked, this.name)"; 137 String callBack = "fixationCallback(this.checked, this.name)";
138 138
139 overviewService.generateOverview( 139 overviewService.generateOverview(
140 locale, 140 locale,
141 artifact.getUuid(), 141 artifact.getUuid(),
142 "{\"fixings\": {\"river\": {\"name\": \"" + river + "\"}}}", 142 fixFilter.getOverviewFilter(),
143 renderCheckboxes(), 143 renderCheckboxes(),
144 callBack, 144 callBack,
145 new AsyncCallback<FixingsOverviewInfo>() { 145 new AsyncCallback<FixingsOverviewInfo>() {
146 public void onFailure(Throwable caught) { 146 public void onFailure(Throwable caught) {
147 GWT.log("Could not receive overview."); 147 GWT.log("Could not receive overview.");
301 protected double fromKm; 301 protected double fromKm;
302 protected double toKm; 302 protected double toKm;
303 protected double currentKm; 303 protected double currentKm;
304 protected int fromClass; 304 protected int fromClass;
305 protected int toClass; 305 protected int toClass;
306 protected Date fromDate; 306 protected long fromDate;
307 protected Date toDate; 307 protected long toDate;
308 protected boolean hasDate;
308 protected int[] events; 309 protected int[] events;
309 310
310 public FixFilter() {} 311 public FixFilter() {
312 this.river = "";
313 this.fromKm = -1d;
314 this.toKm = -1;
315 this.currentKm = -1;
316 this.fromClass = -1;
317 this.toClass = -1;
318 this.fromDate = -1;
319 this.toDate = -1;
320 this.hasDate = false;
321 this.events = new int[0];
322 }
311 323
312 public void setRiver(String river) { 324 public void setRiver(String river) {
313 this.river = river; 325 this.river = river;
314 } 326 }
315 327
331 343
332 public void setToClass(int to) { 344 public void setToClass(int to) {
333 this.toClass = to; 345 this.toClass = to;
334 } 346 }
335 347
336 public void setFromDate(Date from) { 348 public void setFromDate(long from) {
349 this.hasDate = true;
337 this.fromDate = from; 350 this.fromDate = from;
338 } 351 }
339 352
340 public void setToDate(Date to) { 353 public void setToDate(long to) {
354 this.hasDate = true;
341 this.toDate = to; 355 this.toDate = to;
342 } 356 }
343 357
344 public void setEvents(int[] ev) { 358 public void setEvents(int[] ev) {
345 this.events = ev; 359 this.events = ev;
367 381
368 public int getToClass() { 382 public int getToClass() {
369 return this.toClass; 383 return this.toClass;
370 } 384 }
371 385
372 public Date getFromDate() { 386 public long getFromDate() {
373 return this.fromDate; 387 return this.fromDate;
374 } 388 }
375 389
376 public Date getToDate() { 390 public long getToDate() {
377 return this.toDate; 391 return this.toDate;
378 } 392 }
379 393
380 public int[] getEvents() { 394 public int[] getEvents() {
381 return this.events; 395 return this.events;

http://dive4elements.wald.intevation.org