ingo@20: package de.intevation.flys.client.client.ui; ingo@20: ingo@20: import com.google.gwt.core.client.GWT; ingo@20: ingo@20: import com.smartgwt.client.types.VerticalAlignment; ingo@20: import com.smartgwt.client.widgets.Canvas; ingo@20: import com.smartgwt.client.widgets.Label; ingo@20: import com.smartgwt.client.widgets.layout.HLayout; ingo@20: ingo@20: import de.intevation.flys.client.shared.model.Data; ingo@20: ingo@20: ingo@20: /** ingo@20: * This UIProvider displays the DataItems contained in the Data object in a ingo@20: * combo box as SelectProvider does. Furthermore, there is a map displayed that ingo@20: * lets the user choose a river by selecting it on the map. ingo@20: * ingo@20: * @author Ingo Weinzierl ingo@20: */ ingo@20: public class MapSelection extends SelectProvider { ingo@20: ingo@20: public MapSelection() { ingo@20: } ingo@20: ingo@20: ingo@20: /** ingo@20: * This method currently returns a ingo@20: * {@link com.smartgwt.client.widgets.form.DynamicForm} that contains all ingo@20: * data items in a combobox stored in data.
ingo@20: * ingo@20: * TODO: The map panel for the river selection needs to be ingo@20: * implemented! ingo@20: * ingo@20: * @param data The {@link Data} object. ingo@20: * ingo@20: * @return a combobox. ingo@20: */ ingo@20: protected Canvas createWidget(Data data) { ingo@20: GWT.log("MapSelection - create()"); ingo@20: ingo@20: HLayout h = new HLayout(); ingo@20: h.setAlign(VerticalAlignment.TOP); ingo@20: ingo@20: Canvas form = super.createWidget(data); ingo@30: form.setWidth(250); ingo@20: ingo@20: Label label = new Label("TODO: Map with rivers."); ingo@20: label.setValign(VerticalAlignment.TOP); ingo@20: ingo@20: // TODO add the map panel to select the rivers via map. ingo@20: ingo@20: h.addMember(form); ingo@20: h.addMember(label); ingo@20: ingo@20: return h; ingo@20: } ingo@20: } ingo@20: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :