Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/MeasurementStationPanel.java @ 4691:62091b0ef789
Fix filtering of Collections/Projects in the gui
The filter was reseted after each reloading of the users collections.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 17 Dec 2012 16:13:42 +0100 |
parents | 0c766c475805 |
children |
rev | line source |
---|---|
4269
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.client.ui; |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
2 |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
3 import com.google.gwt.core.client.GWT; |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
4 import com.google.gwt.user.client.rpc.AsyncCallback; |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
5 import de.intevation.flys.client.client.FLYS; |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
6 import de.intevation.flys.client.shared.model.RiverInfo; |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
7 |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
8 /** |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
9 * A Panel to show info about the MeasurementStations of a river |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
10 * |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
11 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
12 */ |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
13 public class MeasurementStationPanel extends InfoPanel { |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
14 |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
15 /** |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
16 * MeasurementStationPanel loads the MeasurementStations from the |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
17 * RiverInfoService and displays them in a tree underneath a RiverInfoPanel |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
18 * |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
19 * @param flys The FLYS object |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
20 */ |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
21 public MeasurementStationPanel(FLYS flys) { |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
22 super(new MeasurementStationTree(flys)); |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
23 } |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
24 |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
25 /** |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
26 * Returns the title which should be displayed in the section |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
27 */ |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
28 @Override |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
29 public String getSectionTitle() { |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
30 return MSG.measurementStationPanelTitle(); |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
31 } |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
32 |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
33 /** |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
34 * Loads the river info and renders it afterwards |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
35 */ |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
36 @Override |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
37 public void refresh() { |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
38 contract(); |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
39 |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
40 riverInfoService.getMeasurementStations(this.river, |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
41 new AsyncCallback<RiverInfo>() { |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
42 @Override |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
43 public void onFailure(Throwable e) { |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
44 GWT.log("Could not load the river info." + e); |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
45 } |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
46 |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
47 @Override |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
48 public void onSuccess(RiverInfo riverinfo) { |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
49 GWT.log("Loaded river info"); |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
50 render(riverinfo); |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
51 expand(); |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
52 } |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
53 }); |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
54 } |
0c766c475805
Add Panel and Tree UI classes for dispayling the measurement station info
Björn Ricks <bjoern.ricks@intevation.de>
parents:
diff
changeset
|
55 } |