9063
|
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 |
9079
|
11 import org.dive4elements.river.client.client.ui.AbstractEpochPanel; |
9066
|
12 import org.dive4elements.river.client.client.ui.PanelHelper; |
9063
|
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 |
9079
|
21 public class LoadSingleEpochMinMaxPanel extends AbstractEpochPanel { |
|
22 |
9066
|
23 private static final long serialVersionUID = 1L; |
|
24 |
9079
|
25 public LoadSingleEpochMinMaxPanel() { |
|
26 super(Type.singleMinMax); |
|
27 } |
9063
|
28 |
9079
|
29 @Override |
|
30 protected String getDatakey() { |
|
31 return "totalepoch"; |
|
32 } |
9063
|
33 |
9079
|
34 @Override |
|
35 protected Canvas createWidget(final DataList data) { |
9063
|
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); |
9079
|
43 final TextItem start = createStartInputItem(this.MSG.from()); |
|
44 start.setCanEdit(false); |
9063
|
45 |
9079
|
46 final TextItem end = createEndInputItem(this.MSG.to()); |
|
47 end.setCanEdit(false); |
|
48 |
|
49 form.setFields(start, end); |
|
50 |
9066
|
51 root.addMember(title); |
|
52 root.addMember(PanelHelper.getSpacer(10)); |
|
53 root.addMember(form); |
9063
|
54 |
|
55 return root; |
|
56 } |
|
57 |
|
58 } |