Mercurial > dive4elements > river
view gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstCalcSelectRadioPanel.java @ 9559:ba0561906f81
Uinfo inundation duration workflow (vegetation zones, scenario), wms-config changed
author | gernotbelger |
---|---|
date | Wed, 24 Oct 2018 18:40:38 +0200 |
parents | 51212d40ff56 |
children |
line wrap: on
line source
/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde * Software engineering by Intevation GmbH * * This file is Free Software under the GNU AGPL (>=v3) * and comes with ABSOLUTELY NO WARRANTY! Check out the * documentation coming with Dive4Elements River for details. */ package org.dive4elements.river.client.client.ui.bundu; import org.dive4elements.river.client.client.ui.RadioPanel; import org.dive4elements.river.client.shared.model.Data; import org.dive4elements.river.client.shared.model.DataItem; import org.dive4elements.river.client.shared.model.DefaultData; import org.dive4elements.river.client.shared.model.DefaultDataItem; public class BunduWstCalcSelectRadioPanel extends RadioPanel { private static final long serialVersionUID = 3357071563224461043L; public BunduWstCalcSelectRadioPanel(final String datakey) { super(datakey); } @Override protected Data[] getData() { // if auto selected, additional custom data (function) has to be set. the rest is standard radioPanel behaviour final String value = this.form.getValueAsString("selection"); final DataItem item = new DefaultDataItem("label_irrelevant", "description_irrelevant", value); final DefaultData selection = new DefaultData(getDatakey(), "label_no_effect", "description_no_effect", new DataItem[] { item }); if (value.equals("state.bundu.wst.calc.auto")) { final Data[] data = new Data[3]; data[0] = selection; data[1] = new DefaultData("function", "", "", new DataItem[] { new DefaultDataItem("", "", "log-linear") }); data[2] = new DefaultData("preprocessing", "", "", new DataItem[] { new DefaultDataItem("", "", "true") }); return data; } return new Data[] { selection }; } }