comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/VegetationzonesTablePanel.java @ 9070:611a523fc42f

VegetationZoneAccessHelper, VegetationTablePanels verbessert
author gernotbelger
date Tue, 15 May 2018 18:04:36 +0200
parents 1ffd38826175
children 41f4bc83aa7a
comparison
equal deleted inserted replaced
9069:1ffd38826175 9070:611a523fc42f
6 * documentation coming with Dive4Elements River for details. 6 * documentation coming with Dive4Elements River for details.
7 */ 7 */
8 8
9 package org.dive4elements.river.client.client.ui.uinfo; 9 package org.dive4elements.river.client.client.ui.uinfo;
10 10
11 import org.dive4elements.river.client.client.ui.PanelHelper;
12 import org.dive4elements.river.client.shared.model.DataList; 11 import org.dive4elements.river.client.shared.model.DataList;
13 12
14 import com.smartgwt.client.widgets.Canvas; 13 import com.smartgwt.client.widgets.Canvas;
15 import com.smartgwt.client.widgets.Label;
16 import com.smartgwt.client.widgets.form.validator.IsIntegerValidator;
17 import com.smartgwt.client.widgets.form.validator.IsStringValidator;
18 import com.smartgwt.client.widgets.grid.ListGridField;
19 14
20 public class VegetationzonesTablePanel extends SuperVegZonesTablePanel { 15 public class VegetationzonesTablePanel extends AbstractVegZonesTablePanel {
21 16
22 private static final long serialVersionUID = 1L; 17 private static final long serialVersionUID = 1L;
23 18
24 @Override 19 @Override
25 public Canvas createWidget(final DataList data) { 20 public Canvas createWidget(final DataList data) {
26 21
27 data.add(VegetationzonesTablePanel.getDummyData()); // TODO: GET REAL DATA! 22 createTable(data, 420);
28 23 this.elements.setFields(this.vegzoneField, this.fromField, this.toField);
29 final Label title = new Label(data.get(0).getDescription());
30 title.setHeight("35px"); // orig:25
31
32 this.vegzone = PanelHelper.createItem("uinfo_vegetation_zone_label", this.MSG.uinfo_vegetation_zone_label(), 200, new IsStringValidator());
33 this.start = PanelHelper.createItem("uinfo_vegetation_zones_from", this.MSG.uinfo_vegetation_zones_from(), 40, new IsIntegerValidator());
34 this.end = PanelHelper.createItem("uinfo_vegetation_zones_to", this.MSG.uinfo_vegetation_zones_to(), 40, new IsIntegerValidator());
35
36 final Label sel = new Label(this.MSG.select());
37 sel.setHeight(25);
38 this.elements.setWidth(420); // 185
39 this.elements.setHeight(300); //
40 this.elements.setShowHeaderContextMenu(false);
41 this.elements.setCanReorderFields(false);
42 this.elements.setCanSort(false);
43 this.elements.setCanEdit(false);
44 final ListGridField vegzone = new ListGridField("vegzone", this.MSG.uinfo_vegetation_zones_label());
45 final ListGridField from = new ListGridField("from", this.MSG.uinfo_vegetation_zones_from());
46 final ListGridField to = new ListGridField("to", this.MSG.uinfo_vegetation_zones_to());
47 vegzone.setWidth(265);
48 from.setWidth(70);
49 to.setWidth(70);
50
51 addDataInit(data);
52
53 this.elements.setFields(vegzone, from, to);
54
55 this.tableLayout.addMember(this.elements);
56 this.root.addMember(title);
57 this.root.addMember(this.input);
58 this.root.addMember(this.tableLayout);
59 this.root.addMember(PanelHelper.getSpacer(10));
60
61 return this.root; 24 return this.root;
62 } 25 }
63
64 } 26 }

http://dive4elements.wald.intevation.org