comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/ModuleSelection.java @ 282:e92f7ef455d6

Show rivers as links instead of a combobox. flys-client/trunk@1911 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 12 May 2011 14:59:18 +0000
parents b92281182c6b
children 2e02db03e576
comparison
equal deleted inserted replaced
281:c271012a97a3 282:e92f7ef455d6
15 import de.intevation.flys.client.shared.model.Data; 15 import de.intevation.flys.client.shared.model.Data;
16 import de.intevation.flys.client.shared.model.DataItem; 16 import de.intevation.flys.client.shared.model.DataItem;
17 import de.intevation.flys.client.shared.model.DataList; 17 import de.intevation.flys.client.shared.model.DataList;
18 import de.intevation.flys.client.shared.model.DefaultData; 18 import de.intevation.flys.client.shared.model.DefaultData;
19 import de.intevation.flys.client.shared.model.DefaultDataItem; 19 import de.intevation.flys.client.shared.model.DefaultDataItem;
20 import de.intevation.flys.client.client.event.HasStepForwardHandlers;
20 21
21 import de.intevation.flys.client.client.FLYSConstants; 22 import de.intevation.flys.client.client.FLYSConstants;
22 23
23 /** 24 /**
24 * The ModuleSelection combines the river selection and the module selection in 25 * The ModuleSelection combines the river selection and the module selection in
73 * @return the module selection combined with the river selection. 74 * @return the module selection combined with the river selection.
74 */ 75 */
75 public Canvas create(DataList data) { 76 public Canvas create(DataList data) {
76 VLayout newLayout = new VLayout(); 77 VLayout newLayout = new VLayout();
77 newLayout.setMembersMargin(10); 78 newLayout.setMembersMargin(10);
78 //newLayout.setAlign(VerticalAlignment.TOP); 79 newLayout.setAlign(VerticalAlignment.TOP);
80 Canvas moduleSelection = createWidget();
79 81
80 Canvas moduleSelection = createWidget(); 82 moduleSelection.setHeight(100);
81 Canvas riverSelection = super.createWidget(data); 83 newLayout.setHeight(70);
82 Canvas go = getNextButton();
83 //go.setLayoutAlign(VerticalAlignment.TOP);
84
85 riverSelection.setHeight(25);
86 moduleSelection.setHeight(25);
87
88 newLayout.addMember(moduleSelection); 84 newLayout.addMember(moduleSelection);
89 newLayout.addMember(riverSelection);
90 newLayout.addMember(go);
91 85
92 return newLayout; 86 return newLayout;
93 } 87 }
94 88
95 89
105 DynamicForm form = new DynamicForm(); 99 DynamicForm form = new DynamicForm();
106 100
107 radio = new RadioGroupItem("plugin"); 101 radio = new RadioGroupItem("plugin");
108 102
109 label.setWidth(50); 103 label.setWidth(50);
104 label.setHeight(25);
110 105
111 LinkedHashMap values = new LinkedHashMap(); 106 LinkedHashMap values = new LinkedHashMap();
112 values.put(FIELD_PLUGIN_WINFO, messages.winfo()); 107 values.put(FIELD_PLUGIN_WINFO, messages.winfo());
113 values.put(FIELD_PLUGIN_MINFO, messages.minfo()); 108 values.put(FIELD_PLUGIN_MINFO, messages.minfo());
114 values.put(FIELD_PLUGIN_FIX, messages.fix()); 109 values.put(FIELD_PLUGIN_FIX, messages.fix());
139 * stores the Data object that represents the river selection. 134 * stores the Data object that represents the river selection.
140 * 135 *
141 * @return the Data that was chosen in this widget. 136 * @return the Data that was chosen in this widget.
142 */ 137 */
143 protected Data[] getData() { 138 protected Data[] getData() {
144 Data[] river = super.getData();
145 139
146 String module = radio.getValueAsString(); 140 String module = radio.getValueAsString();
147 141
148 DataItem[] items = new DefaultDataItem[1]; 142 DataItem[] items = new DefaultDataItem[1];
149 items[0] = new DefaultDataItem(module, module, module); 143 items[0] = new DefaultDataItem(module, module, module);
150 144
151 Data data = new DefaultData("module", null, null, items); 145 Data data = new DefaultData("module", null, null, items);
152 146
153 return new Data[] {data, river[0]}; 147 return new Data[] {data};
154 } 148 }
155 } 149 }
156 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 150 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org