view flys-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugePanel.java @ 5834:f507086aa94b

Repaired internal references.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 12:31:32 +0200
parents flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugePanel.java@3d01658d9c9c
children 821a02bbfb4e
line wrap: on
line source
package de.intevation.flys.client.client.ui.stationinfo;

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;


/**
 * The GaugePanel is intended to be used within a SectionStackSection
 *
 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a>
 */
public class GaugePanel extends InfoPanel {

    /**
     * GaugePanel loads the GaugeInfo from the RiverInfoService and
     * displays them in a tree underneath a RiverInfoPanel
     *
     * @param flys The FLYS object
     */
    public GaugePanel(FLYS flys) {
        super(new GaugeListGrid(flys));
    }


    @Override
    public String getSectionTitle() {
        return MSG.gaugePanelTitle();
    }

    /**
     * Loads the river info and renders it afterwards.
     */
    public void refresh() {
        contract();

        riverInfoService.getGauges(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();
            }
        });
    }
}

http://dive4elements.wald.intevation.org