# HG changeset patch # User Raimund Renkert # Date 1318864648 0 # Node ID e26088566e8ab6c8355c54d4bfcd584484a74bf9 # Parent 290d5687f2020c16c8465e493ffbb250ad1a13a4 Use images for line type and line size selection. flys-client/trunk@2991 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 290d5687f202 -r e26088566e8a flys-client/ChangeLog --- a/flys-client/ChangeLog Mon Oct 17 15:00:12 2011 +0000 +++ b/flys-client/ChangeLog Mon Oct 17 15:17:28 2011 +0000 @@ -1,3 +1,23 @@ +2011-10-17 Raimund Renkert + + * src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java: + Use images for line type and line size selection. + + * src/main/webapp/images/linestyle-dash-10.png, + src/main/webapp/images/linestyle-dash-10-5.png, + src/main/webapp/images/linestyle-1px.png, + src/main/webapp/images/linestyle-2px.png, + src/main/webapp/images/linestyle-3px.png, + src/main/webapp/images/linestyle-4px.png, + src/main/webapp/images/linestyle-5px.png, + src/main/webapp/images/linestyle-dash-20-10.png, + src/main/webapp/images/linestyle-6px.png, + src/main/webapp/images/linestyle-dash-30-10.png, + src/main/webapp/images/linestyle-7px.png, + src/main/webapp/images/linestyle-8px.png, + src/main/webapp/images/linestyle-dash-20-5-15-5.png: + New. + 2011-10-17 Ingo Weinzierl flys/issue253 (Diagramm: Mehrfachauswahl zum Verschieben/Löschen auf Themen) diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java Mon Oct 17 15:00:12 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java Mon Oct 17 15:17:28 2011 +0000 @@ -1,5 +1,7 @@ package de.intevation.flys.client.client.ui; +import java.util.LinkedHashMap; + import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.rpc.AsyncCallback; @@ -12,7 +14,7 @@ import com.smartgwt.client.widgets.form.fields.CheckboxItem; import com.smartgwt.client.widgets.form.fields.SpinnerItem; import com.smartgwt.client.widgets.form.fields.ColorPickerItem; -import com.smartgwt.client.widgets.form.fields.ComboBoxItem; +import com.smartgwt.client.widgets.form.fields.SelectItem; import com.smartgwt.client.widgets.form.fields.StaticTextItem; import com.smartgwt.client.widgets.events.ClickEvent; @@ -162,11 +164,32 @@ FormItem f; if(type.equals("int")) { - SpinnerItem s = new SpinnerItem(name, dname); - s.setMin(1); - s.setMax(10); - s.setValue(value); - f = s; + f = new SelectItem(name, dname); + LinkedHashMap valueIcons = new LinkedHashMap(); + f.setImageURLPrefix(GWT.getHostPageBaseURL() + "images/linestyle-"); + f.setImageURLSuffix("px.png"); + f.setValueIconHeight(20); + f.setValueIconWidth(80); + LinkedHashMap valueMap = new LinkedHashMap(); + valueMap.put("1", ""); + valueMap.put("2", ""); + valueMap.put("3", ""); + valueMap.put("4", ""); + valueMap.put("5", ""); + valueMap.put("6", ""); + valueMap.put("7", ""); + valueMap.put("8", ""); + valueIcons.put("1", "1"); + valueIcons.put("2", "2"); + valueIcons.put("3", "3"); + valueIcons.put("4", "4"); + valueIcons.put("5", "5"); + valueIcons.put("6", "6"); + valueIcons.put("7", "7"); + valueIcons.put("8", "8"); + f.setValueIcons(valueIcons); + f.setValueMap(valueMap); + f.setValue(value); } else if (type.equals("boolean")) { CheckboxItem c = new CheckboxItem(name, dname); @@ -185,8 +208,25 @@ f = c; } else if (type.equals("Dash")) { - f = new ComboBoxItem(name, dname); - f.setValueMap("10", "10,5", "20,10", "30,10", "20,5,15,5"); + f = new SelectItem(name, dname); + LinkedHashMap valueIcons = new LinkedHashMap(); + f.setImageURLPrefix(GWT.getHostPageBaseURL() + "images/linestyle-dash-"); + f.setImageURLSuffix(".png"); + f.setValueIconHeight(20); + f.setValueIconWidth(80); + LinkedHashMap valueMap = new LinkedHashMap(); + valueMap.put("10", ""); + valueMap.put("10,5", ""); + valueMap.put("20,10", ""); + valueMap.put("30,10", ""); + valueMap.put("20,5,15,5", ""); + valueIcons.put("10", "10"); + valueIcons.put("10,5", "10-5"); + valueIcons.put("20,10", "20-10"); + valueIcons.put("30,10", "30-10"); + valueIcons.put("20,5,15,5", "20-5-15-5"); + f.setValueIcons(valueIcons); + f.setValueMap(valueMap); f.setValue(value); } else { diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/webapp/images/linestyle-1px.png Binary file flys-client/src/main/webapp/images/linestyle-1px.png has changed diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/webapp/images/linestyle-2px.png Binary file flys-client/src/main/webapp/images/linestyle-2px.png has changed diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/webapp/images/linestyle-3px.png Binary file flys-client/src/main/webapp/images/linestyle-3px.png has changed diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/webapp/images/linestyle-4px.png Binary file flys-client/src/main/webapp/images/linestyle-4px.png has changed diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/webapp/images/linestyle-5px.png Binary file flys-client/src/main/webapp/images/linestyle-5px.png has changed diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/webapp/images/linestyle-6px.png Binary file flys-client/src/main/webapp/images/linestyle-6px.png has changed diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/webapp/images/linestyle-7px.png Binary file flys-client/src/main/webapp/images/linestyle-7px.png has changed diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/webapp/images/linestyle-8px.png Binary file flys-client/src/main/webapp/images/linestyle-8px.png has changed diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/webapp/images/linestyle-dash-10-5.png Binary file flys-client/src/main/webapp/images/linestyle-dash-10-5.png has changed diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/webapp/images/linestyle-dash-10.png Binary file flys-client/src/main/webapp/images/linestyle-dash-10.png has changed diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/webapp/images/linestyle-dash-20-10.png Binary file flys-client/src/main/webapp/images/linestyle-dash-20-10.png has changed diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/webapp/images/linestyle-dash-20-5-15-5.png Binary file flys-client/src/main/webapp/images/linestyle-dash-20-5-15-5.png has changed diff -r 290d5687f202 -r e26088566e8a flys-client/src/main/webapp/images/linestyle-dash-30-10.png Binary file flys-client/src/main/webapp/images/linestyle-dash-30-10.png has changed