Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/InundationWMSInputPanel.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 | 787fc085459b |
children |
comparison
equal
deleted
inserted
replaced
9558:709a73badd48 | 9559:ba0561906f81 |
---|---|
13 import org.dive4elements.river.client.shared.model.DataList; | 13 import org.dive4elements.river.client.shared.model.DataList; |
14 | 14 |
15 import com.smartgwt.client.widgets.Canvas; | 15 import com.smartgwt.client.widgets.Canvas; |
16 import com.smartgwt.client.widgets.Label; | 16 import com.smartgwt.client.widgets.Label; |
17 import com.smartgwt.client.widgets.form.DynamicForm; | 17 import com.smartgwt.client.widgets.form.DynamicForm; |
18 import com.smartgwt.client.widgets.form.fields.StaticTextItem; | |
18 import com.smartgwt.client.widgets.form.fields.TextItem; | 19 import com.smartgwt.client.widgets.form.fields.TextItem; |
19 import com.smartgwt.client.widgets.layout.VLayout; | 20 import com.smartgwt.client.widgets.layout.VLayout; |
20 | 21 |
21 public class InundationWMSInputPanel extends AbstractSingleItemPanel { | 22 public class InundationWMSInputPanel extends AbstractSingleItemPanel { |
22 | 23 |
23 private static final long serialVersionUID = 1L; | 24 private static final long serialVersionUID = 1L; |
24 private final boolean isEditable; | 25 private final boolean isEditable; |
26 private final String dataKey; | |
27 private final String appendString; | |
25 | 28 |
26 public InundationWMSInputPanel(final FLYSConstants msg, final String titleForCreateOld, final boolean isEditable) { | 29 public InundationWMSInputPanel(final FLYSConstants msg, final String dataKey, final String titleForCreateOld, final String appendString, |
27 super(new UinfoInundationSingleYearEpochBehaviour(msg, titleForCreateOld)); | 30 final boolean isEditable) { |
31 super(new UinfoInundationSingleYearEpochBehaviour(appendString, msg, titleForCreateOld)); | |
28 this.isEditable = isEditable; | 32 this.isEditable = isEditable; |
33 this.dataKey = dataKey; | |
34 this.appendString = appendString; | |
29 } | 35 } |
30 | 36 |
31 @Override | 37 @Override |
32 protected String getDatakey() { | 38 protected String getDatakey() { |
33 return "year_epoch_select"; | 39 return this.dataKey; |
34 } | 40 } |
35 | 41 |
36 @Override | 42 @Override |
37 protected String errorForItemMsg() { | 43 protected String errorForItemMsg() { |
38 return this.MSG.no_data_for_input(); | 44 return this.MSG.no_data_for_input(); |
49 form.setNumCols(4); | 55 form.setNumCols(4); |
50 | 56 |
51 final TextItem inputItem = createInputItem("INPUT"); | 57 final TextItem inputItem = createInputItem("INPUT"); |
52 inputItem.setWidth(250); | 58 inputItem.setWidth(250); |
53 inputItem.setCanEdit(this.isEditable); | 59 inputItem.setCanEdit(this.isEditable); |
60 | |
54 inputItem.setShowTitle(false); | 61 inputItem.setShowTitle(false); |
55 form.setFields(inputItem); | 62 |
63 if (this.appendString != null) { | |
64 | |
65 final StaticTextItem fromText = new StaticTextItem("staticAppend"); | |
66 fromText.setValue(this.appendString); | |
67 fromText.setShowTitle(false); | |
68 form.setFields(inputItem, fromText); | |
69 } else { | |
70 form.setFields(inputItem); | |
71 } | |
56 | 72 |
57 layout.addMember(title); | 73 layout.addMember(title); |
58 layout.addMember(form); | 74 layout.addMember(form); |
59 | 75 |
60 return layout; | 76 return layout; |