Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/LoadSingleEpochMinMaxPanel.java @ 9079:aafae1ab25f0
epoch-panels, single-input-panels
author | gernotbelger |
---|---|
date | Wed, 23 May 2018 17:30:24 +0200 |
parents | gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/LoadSingleEpochPanel.java@b5d7a9d79837 |
children |
comparison
equal
deleted
inserted
replaced
9078:fc02833dbcc1 | 9079:aafae1ab25f0 |
---|---|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde | |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU AGPL (>=v3) | |
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
6 * documentation coming with Dive4Elements River for details. | |
7 */ | |
8 | |
9 package org.dive4elements.river.client.client.ui.uinfo; | |
10 | |
11 import org.dive4elements.river.client.client.ui.AbstractEpochPanel; | |
12 import org.dive4elements.river.client.client.ui.PanelHelper; | |
13 import org.dive4elements.river.client.shared.model.DataList; | |
14 | |
15 import com.smartgwt.client.widgets.Canvas; | |
16 import com.smartgwt.client.widgets.Label; | |
17 import com.smartgwt.client.widgets.form.DynamicForm; | |
18 import com.smartgwt.client.widgets.form.fields.TextItem; | |
19 import com.smartgwt.client.widgets.layout.VLayout; | |
20 | |
21 public class LoadSingleEpochMinMaxPanel extends AbstractEpochPanel { | |
22 | |
23 private static final long serialVersionUID = 1L; | |
24 | |
25 public LoadSingleEpochMinMaxPanel() { | |
26 super(Type.singleMinMax); | |
27 } | |
28 | |
29 @Override | |
30 protected String getDatakey() { | |
31 return "totalepoch"; | |
32 } | |
33 | |
34 @Override | |
35 protected Canvas createWidget(final DataList data) { | |
36 final VLayout root = new VLayout(); | |
37 | |
38 final Label title = new Label(data.get(0).getDescription()); | |
39 title.setHeight("25px"); | |
40 | |
41 final DynamicForm form = new DynamicForm(); | |
42 form.setNumCols(4); | |
43 final TextItem start = createStartInputItem(this.MSG.from()); | |
44 start.setCanEdit(false); | |
45 | |
46 final TextItem end = createEndInputItem(this.MSG.to()); | |
47 end.setCanEdit(false); | |
48 | |
49 form.setFields(start, end); | |
50 | |
51 root.addMember(title); | |
52 root.addMember(PanelHelper.getSpacer(10)); | |
53 root.addMember(form); | |
54 | |
55 return root; | |
56 } | |
57 | |
58 } |