Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/client/ui/MeasurementStationPanel.java @ 4392:0dace49f89a0
Merged
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 05 Nov 2012 09:18:59 +0100 |
parents | 0c766c475805 |
children |
line wrap: on
line source
package de.intevation.flys.client.client.ui; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.rpc.AsyncCallback; import de.intevation.flys.client.client.FLYS; import de.intevation.flys.client.shared.model.RiverInfo; /** * A Panel to show info about the MeasurementStations of a river * * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> */ public class MeasurementStationPanel extends InfoPanel { /** * MeasurementStationPanel loads the MeasurementStations from the * RiverInfoService and displays them in a tree underneath a RiverInfoPanel * * @param flys The FLYS object */ public MeasurementStationPanel(FLYS flys) { super(new MeasurementStationTree(flys)); } /** * Returns the title which should be displayed in the section */ @Override public String getSectionTitle() { return MSG.measurementStationPanelTitle(); } /** * Loads the river info and renders it afterwards */ @Override public void refresh() { contract(); riverInfoService.getMeasurementStations(this.river, new AsyncCallback<RiverInfo>() { @Override public void onFailure(Throwable e) { GWT.log("Could not load the river info." + e); } @Override public void onSuccess(RiverInfo riverinfo) { GWT.log("Loaded river info"); render(riverinfo); expand(); } }); } }