Mercurial > dive4elements > river
view gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/VegetationzonesTablePanel.java @ 9069:1ffd38826175
access uinfo.vegetationzones+inundation_duration
author | gernotbelger |
---|---|
date | Tue, 15 May 2018 12:00:26 +0200 |
parents | a5cf8d7bff3c |
children | 611a523fc42f |
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.uinfo; import org.dive4elements.river.client.client.ui.PanelHelper; import org.dive4elements.river.client.shared.model.DataList; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.Label; import com.smartgwt.client.widgets.form.validator.IsIntegerValidator; import com.smartgwt.client.widgets.form.validator.IsStringValidator; import com.smartgwt.client.widgets.grid.ListGridField; public class VegetationzonesTablePanel extends SuperVegZonesTablePanel { private static final long serialVersionUID = 1L; @Override public Canvas createWidget(final DataList data) { data.add(VegetationzonesTablePanel.getDummyData()); // TODO: GET REAL DATA! final Label title = new Label(data.get(0).getDescription()); title.setHeight("35px"); // orig:25 this.vegzone = PanelHelper.createItem("uinfo_vegetation_zone_label", this.MSG.uinfo_vegetation_zone_label(), 200, new IsStringValidator()); this.start = PanelHelper.createItem("uinfo_vegetation_zones_from", this.MSG.uinfo_vegetation_zones_from(), 40, new IsIntegerValidator()); this.end = PanelHelper.createItem("uinfo_vegetation_zones_to", this.MSG.uinfo_vegetation_zones_to(), 40, new IsIntegerValidator()); final Label sel = new Label(this.MSG.select()); sel.setHeight(25); this.elements.setWidth(420); // 185 this.elements.setHeight(300); // this.elements.setShowHeaderContextMenu(false); this.elements.setCanReorderFields(false); this.elements.setCanSort(false); this.elements.setCanEdit(false); final ListGridField vegzone = new ListGridField("vegzone", this.MSG.uinfo_vegetation_zones_label()); final ListGridField from = new ListGridField("from", this.MSG.uinfo_vegetation_zones_from()); final ListGridField to = new ListGridField("to", this.MSG.uinfo_vegetation_zones_to()); vegzone.setWidth(265); from.setWidth(70); to.setWidth(70); addDataInit(data); this.elements.setFields(vegzone, from, to); this.tableLayout.addMember(this.elements); this.root.addMember(title); this.root.addMember(this.input); this.root.addMember(this.tableLayout); this.root.addMember(PanelHelper.getSpacer(10)); return this.root; } }