comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/MeasurementStationPanel.java @ 4269:0c766c475805

Add Panel and Tree UI classes for dispayling the measurement station info The new ui classes are using the new extracted base class InfoPanel and InfoTree which are in common with the gauge info.
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 26 Oct 2012 12:22:06 +0200
parents
children
comparison
equal deleted inserted replaced
4268:f75968f0ce80 4269:0c766c475805
1 package de.intevation.flys.client.client.ui;
2
3 import com.google.gwt.core.client.GWT;
4 import com.google.gwt.user.client.rpc.AsyncCallback;
5 import de.intevation.flys.client.client.FLYS;
6 import de.intevation.flys.client.shared.model.RiverInfo;
7
8 /**
9 * A Panel to show info about the MeasurementStations of a river
10 *
11 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a>
12 */
13 public class MeasurementStationPanel extends InfoPanel {
14
15 /**
16 * MeasurementStationPanel loads the MeasurementStations from the
17 * RiverInfoService and displays them in a tree underneath a RiverInfoPanel
18 *
19 * @param flys The FLYS object
20 */
21 public MeasurementStationPanel(FLYS flys) {
22 super(new MeasurementStationTree(flys));
23 }
24
25 /**
26 * Returns the title which should be displayed in the section
27 */
28 @Override
29 public String getSectionTitle() {
30 return MSG.measurementStationPanelTitle();
31 }
32
33 /**
34 * Loads the river info and renders it afterwards
35 */
36 @Override
37 public void refresh() {
38 contract();
39
40 riverInfoService.getMeasurementStations(this.river,
41 new AsyncCallback<RiverInfo>() {
42 @Override
43 public void onFailure(Throwable e) {
44 GWT.log("Could not load the river info." + e);
45 }
46
47 @Override
48 public void onSuccess(RiverInfo riverinfo) {
49 GWT.log("Loaded river info");
50 render(riverinfo);
51 expand();
52 }
53 });
54 }
55 }

http://dive4elements.wald.intevation.org