Mercurial > dive4elements > river
changeset 57:246af33f621c
Adjusted the look of the 'next' button in the parameter panel.
flys-client/trunk@1516 c6561f87-3c4e-4783-a992-168aeb5c3f6f
line wrap: on
line diff
--- a/flys-client/ChangeLog Fri Mar 18 09:36:28 2011 +0000 +++ b/flys-client/ChangeLog Fri Mar 18 11:32:05 2011 +0000 @@ -1,3 +1,28 @@ +2011-03-18 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/client/client/FLYSMessages_en.properties, + src/main/java/de/intevation/flys/client/client/FLYSMessages_de.properties, + src/main/java/de/intevation/flys/client/client/FLYSMessages.java: Added + localized strings that point to the images of the 'next' button. + + * src/main/java/de/intevation/flys/client/client/ui/AbstractUIProvider.java: + There is a method that creates the 'next' button, adds the UIProvider as + ClickHandler and returns the button. + + * src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java, + src/main/java/de/intevation/flys/client/client/ui/ParameterList.java, + src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java, + src/main/java/de/intevation/flys/client/client/ui/SelectProvider.java, + src/main/java/de/intevation/flys/client/client/ui/ModuleSelection.java: + The 'next' button is created in the AbstractUIProvider. So, we have a + central place to adjust the look of this button. + + * src/main/webapp/images/next.xcf, + src/main/webapp/images/next.png, + src/main/webapp/images/next_en.png, + src/main/webapp/images/next_de.png: Images for the 'next' button in the + parameterization. + 2011-03-18 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages.java Fri Mar 18 09:36:28 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages.java Fri Mar 18 11:32:05 2011 +0000 @@ -133,5 +133,8 @@ @DefaultMessage("m³/s") String unitQStep(); + + @DefaultMessage("/images/next.png") + String imageNext(); } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages_de.properties Fri Mar 18 09:36:28 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages_de.properties Fri Mar 18 11:32:05 2011 +0000 @@ -41,3 +41,5 @@ unitQFrom = m³/s - unitQTo = m³/s a unitQStep = m³/s + +imageNext = /images/next_de.png
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages_en.properties Fri Mar 18 09:36:28 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages_en.properties Fri Mar 18 11:32:05 2011 +0000 @@ -33,3 +33,13 @@ wqQ = Q [m³/s] wqSingle = Single values wqRange = Range +unitWSingle = cm +unitWFrom = cm - +unitWTo = cm a +unitWStep = cm +unitQSingle = m³/s +unitQFrom = m³/s - +unitQTo = m³/s a +unitQStep = m³/s + +imageNext = /images/next_en.png
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/AbstractUIProvider.java Fri Mar 18 09:36:28 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/AbstractUIProvider.java Fri Mar 18 11:32:05 2011 +0000 @@ -6,9 +6,11 @@ import com.google.gwt.core.client.GWT; import com.smartgwt.client.widgets.Canvas; +import com.smartgwt.client.widgets.Img; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; +import de.intevation.flys.client.client.FLYSMessages; import de.intevation.flys.client.client.event.HasStepForwardHandlers; import de.intevation.flys.client.client.event.StepForwardEvent; import de.intevation.flys.client.client.event.StepForwardHandler; @@ -24,6 +26,10 @@ public abstract class AbstractUIProvider implements UIProvider, HasStepForwardHandlers, ClickHandler { + /** The message class that provides i18n strings.*/ + protected FLYSMessages MSG = GWT.create(FLYSMessages.class); + + /** The StepForwardHandlers.*/ protected List<StepForwardHandler> forwardHandlers; @@ -75,6 +81,14 @@ } + protected Canvas getNextButton() { + Img go = new Img(MSG.imageNext(), 80, 25); + go.addClickHandler(this); + + return go; + } + + /** * This method needs to be implemented by concrete subclasses. It should * create a new Canvas object with a representation of <i>data</i>.
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java Fri Mar 18 09:36:28 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java Fri Mar 18 11:32:05 2011 +0000 @@ -6,7 +6,6 @@ import com.google.gwt.core.client.GWT; import com.smartgwt.client.widgets.Canvas; -import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.Label; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.events.BlurHandler; @@ -104,9 +103,9 @@ initDefaults(data); - Label label = new Label(MESSAGES.location_distance_state()); - Canvas widget = createWidget(data); - IButton submit = new IButton(MESSAGES.next(), this); + Label label = new Label(MESSAGES.location_distance_state()); + Canvas widget = createWidget(data); + Canvas submit = getNextButton(); label.setHeight(25);
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ModuleSelection.java Fri Mar 18 09:36:28 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ModuleSelection.java Fri Mar 18 11:32:05 2011 +0000 @@ -5,7 +5,6 @@ import com.google.gwt.core.client.GWT; import com.smartgwt.client.widgets.Canvas; -import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.Label; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.RadioGroupItem; @@ -75,7 +74,7 @@ Canvas moduleSelection = createWidget(); Canvas riverSelection = super.createWidget(data); - IButton go = new IButton(MESSAGES.next(), this); + Canvas go = getNextButton(); moduleSelection.setHeight(25);
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java Fri Mar 18 09:36:28 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java Fri Mar 18 11:32:05 2011 +0000 @@ -7,12 +7,10 @@ import com.smartgwt.client.types.VerticalAlignment; import com.smartgwt.client.widgets.Canvas; -import com.smartgwt.client.widgets.Label; import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; import de.intevation.flys.client.shared.model.Data; -import de.intevation.flys.client.shared.model.DataItem; import de.intevation.flys.client.shared.model.DataList;
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/SelectProvider.java Fri Mar 18 09:36:28 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/SelectProvider.java Fri Mar 18 11:32:05 2011 +0000 @@ -8,7 +8,6 @@ import com.smartgwt.client.types.VerticalAlignment; import com.smartgwt.client.widgets.Canvas; -import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.Label; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.ComboBoxItem; @@ -52,8 +51,7 @@ VLayout v = new VLayout(); Canvas content = createWidget(data); - - IButton button = new IButton(messages.next(), this); + Canvas button = getNextButton(); v.addMember(content); v.addMember(button);
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java Fri Mar 18 09:36:28 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java Fri Mar 18 11:32:05 2011 +0000 @@ -6,7 +6,6 @@ import com.google.gwt.core.client.GWT; import com.smartgwt.client.widgets.Canvas; -import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.Label; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.FormItem; @@ -122,7 +121,7 @@ initDefaults(data); Canvas widget = createWidget(data); - IButton submit = new IButton(MSG.next(), this); + Canvas submit = getNextButton(); Label label = new Label(MSG.wqTitle()); label.setHeight(25);