Mercurial > dive4elements > river
changeset 3384:a6b7f0585761
Merge point/line label styles
flys-client/trunk@5133 c6561f87-3c4e-4783-a992-168aeb5c3f6f
line wrap: on
line diff
--- a/flys-client/ChangeLog Wed Jul 25 12:39:13 2012 +0000 +++ b/flys-client/ChangeLog Thu Jul 26 10:05:50 2012 +0000 @@ -1,3 +1,14 @@ +2012-07-26 Christian Lins <christian.lins@intevation.de> + + * src/main/java/de/intevation/flys/client/server/StyleHelper.java, + src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties, + src/main/java/de/intevation/flys/client/client/FLYSConstants.java, + src/main/java/de/intevation/flys/client/client/FLYSConstants.properties, + src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties, + src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java: + Merge point/line label styles. Add new style options for point/line + label background. + 2012-07-25 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/client/shared/model/DefaultArtifactDescription.java:
--- a/flys-client/pom.xml Wed Jul 25 12:39:13 2012 +0000 +++ b/flys-client/pom.xml Thu Jul 26 10:05:50 2012 +0000 @@ -156,6 +156,8 @@ <hostedWebapp>target/www</hostedWebapp> <!-- Ask GWT to create the Story of Your Compile (SOYC) (gwt:compile) --> <soyc>true</soyc> + <port>8882</port> + <logLevel>INFO' -bindAddress 0.0.0.0 -codeServerPort 9992 -logLevel 'INFO</logLevel> </configuration> </plugin>
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Wed Jul 25 12:39:13 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Thu Jul 26 10:05:50 2012 +0000 @@ -869,17 +869,17 @@ String showpointlabel(); - String linelabelfont(); - - String linelabelcolor(); + String labelfontsize(); - String linelabelsize(); + String labelfontcolor(); - String linelabelstyle(); + String labelfontface(); - String linelabelbgcolor(); + String labelfontstyle(); - String linelabelshowbg(); + String labelbgcolor(); + + String labelshowbg(); String showwidth();
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Wed Jul 25 12:39:13 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Thu Jul 26 10:05:50 2012 +0000 @@ -443,12 +443,12 @@ showlines = Show lines showlinelabel = Show line label showpointlabel = Show point label -linelabelfont = Label: Font -linelabelcolor = Label: Color -linelabelsize = Label: Size -linelabelstyle = Label: Style -linelabelbgcolor = Label: Background Color -linelabelshowbg = Label: Show Background +labelfontface = Label: Font +labelfontcolor = Label: Color +labelfontsize = Label: Size +labelfontstyle = Label: Style +labelbgcolor = Label: Background Color +labelshowbg = Label: Show Background showwidth = Show width showlevel = Show waterlevel showminimum = Show minimum
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Wed Jul 25 12:39:13 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Thu Jul 26 10:05:50 2012 +0000 @@ -443,12 +443,12 @@ showlines = Linien anzeigen showlinelabel = Linienbeschriftung anzeigen showpointlabel = Punktbeschriftung anzeigen -linelabelfont = Beschriftung: Schriftart -linelabelcolor = Beschriftung: Schriftfarbe -linelabelsize = Beschriftung: Schriftgr\u00f6\u00dfe -linelabelstyle = Beschriftung: Schriftstil -linelabelbgcolor = Beschriftung: Hintergrundfarbe -linelabelshowbg = Beschriftung: Hintergrund f\u00fcllen +labelfontface = Beschriftung: Schriftart +labelfontcolor = Beschriftung: Schriftfarbe +labelfontsize = Beschriftung: Schriftgr\u00f6\u00dfe +labelfontstyle = Beschriftung: Schriftstil +labelbgcolor = Beschriftung: Hintergrundfarbe +labelshowbg = Beschriftung: Hintergrund f\u00fcllen showwidth = Breite anzeigen showlevel = Wasserstand anzeigen showminimum = Minimum anzeigen
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Wed Jul 25 12:39:13 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Thu Jul 26 10:05:50 2012 +0000 @@ -445,12 +445,12 @@ showlines = Show lines showlinelabel = Show label showpointlabel = Show point label -linelabelfont = Label: Font -linelabelcolor = Label: Color -linelabelsize = Label: Size -linelabelstyle = Label: Style -linelabelbgcolor = Label: Background Color -linelabelshowbg = Label: Show Background +labelfontface = Label: Font +labelfontcolor = Label: Color +labelfontsize = Label: Size +labelfontstyle = Label: Style +labelbgcolor = Label: Background Color +labelshowbg = Label: Show Background showwidth = Show width showlevel = Show waterlevel showminimum = Show minimum
--- a/flys-client/src/main/java/de/intevation/flys/client/client/config.xml Wed Jul 25 12:39:13 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/config.xml Thu Jul 26 10:05:50 2012 +0000 @@ -1,5 +1,5 @@ <config> - <server>http://localhost:8181</server> + <server>http://localhost:2323</server> <projectlist> <!-- The interval to update the user's projects (in ms) -->
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/AbstractUIProvider.java Wed Jul 25 12:39:13 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/AbstractUIProvider.java Thu Jul 26 10:05:50 2012 +0000 @@ -1,10 +1,6 @@ package de.intevation.flys.client.client.ui; -import java.util.ArrayList; -import java.util.List; - import com.google.gwt.core.client.GWT; - import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.Button; import com.smartgwt.client.widgets.Canvas; @@ -26,10 +22,12 @@ import de.intevation.flys.client.shared.model.Data; import de.intevation.flys.client.shared.model.DataItem; import de.intevation.flys.client.shared.model.DataList; - import de.intevation.flys.client.shared.model.DefaultData; import de.intevation.flys.client.shared.model.DefaultDataItem; +import java.util.ArrayList; +import java.util.List; + /** * An abstract UIProvider that provides some basic methods. @@ -75,6 +73,7 @@ * * @param handler A new StepBackHandler. */ + @Override public void addStepBackHandler(StepBackHandler handler) { if (handler != null) { backHandlers.add(handler); @@ -87,6 +86,7 @@ * * @param handler A new StepForwardHandler. */ + @Override public void addStepForwardHandler(StepForwardHandler handler) { if (handler != null) { forwardHandlers.add(handler); @@ -128,6 +128,7 @@ * * @param e The click event. */ + @Override public void onClick(ClickEvent e) { List<String> errors = validate(); if (errors == null || errors.isEmpty()) { @@ -186,6 +187,7 @@ Img back = new Img(url, 16, 16); back.addClickHandler(new ClickHandler() { + @Override public void onClick(ClickEvent event) { fireStepBackEvent(new StepBackEvent(targetState)); } @@ -201,6 +203,7 @@ * @param helperContainer A container that is used to position helper * widgets. */ + @Override public void setContainer(VLayout helperContainer) { this.helperContainer = helperContainer; } @@ -211,16 +214,19 @@ * * @param art An artifact containing status information. */ + @Override public void setArtifact(Artifact art) { this.artifact = art; } + @Override public void setCollection(Collection collection) { this.collection = collection; } + @Override public void setParameterList(ParameterList list) { this.parameterList = list; } @@ -314,6 +320,7 @@ * * @return a Canvas object that displays <i>data</i>. */ + @Override public abstract Canvas create(DataList data);
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java Wed Jul 25 12:39:13 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java Thu Jul 26 10:05:50 2012 +0000 @@ -17,13 +17,13 @@ import com.smartgwt.client.widgets.form.fields.FormItem; import com.smartgwt.client.widgets.form.fields.SelectItem; import com.smartgwt.client.widgets.form.fields.StaticTextItem; -import com.smartgwt.client.widgets.form.fields.events.ChangedEvent; import com.smartgwt.client.widgets.form.fields.events.BlurEvent; import com.smartgwt.client.widgets.form.fields.events.BlurHandler; +import com.smartgwt.client.widgets.form.fields.events.ChangedEvent; import com.smartgwt.client.widgets.form.fields.events.ChangedHandler; +import com.smartgwt.client.widgets.form.validator.IsFloatValidator; import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; -import com.smartgwt.client.widgets.form.validator.IsFloatValidator; import de.intevation.flys.client.client.Config; import de.intevation.flys.client.client.FLYSConstants; @@ -31,6 +31,7 @@ import de.intevation.flys.client.client.services.CollectionItemAttributeServiceAsync; import de.intevation.flys.client.client.services.ThemeListingService; import de.intevation.flys.client.client.services.ThemeListingServiceAsync; +import de.intevation.flys.client.client.utils.DoubleValidator; import de.intevation.flys.client.shared.model.Collection; import de.intevation.flys.client.shared.model.CollectionItemAttribute; import de.intevation.flys.client.shared.model.FacetRecord; @@ -38,8 +39,6 @@ import de.intevation.flys.client.shared.model.StyleSetting; import de.intevation.flys.client.shared.model.Theme; -import de.intevation.flys.client.client.utils.DoubleValidator; - import java.util.Arrays; import java.util.Iterator; import java.util.LinkedHashMap; @@ -47,6 +46,7 @@ import java.util.Set; /** + * Editor window for styles. * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> */ public class StyleEditorWindow @@ -72,7 +72,7 @@ protected VLayout layout; /** The form that contains all the input widgets. */ - DynamicForm df; + protected DynamicForm df; protected VLayout properties; @@ -299,12 +299,13 @@ "backgroundcolor", "showbackground", "showlinelabel", - "linelabelfont", - "linelabelcolor", - "linelabelsize", - "linelabelstyle", - "linelabelshowbg", - "linelabelbgcolor", + "labelfontface", + "labelfontcolor", + "labelfontsize", + "labelfontstyle", + "labelshowbg", + "labelbgcolor", + "showpointlabel", "bandwidthcolor", "bandwidth"}; @@ -366,7 +367,7 @@ if (name.equals("linesize")) { f = createLineSizeUI(f); } - else if (name.equals("textsize") || name.equals("linelabelsize")) { + else if (name.equals("labelfontsize")) { LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>(); valueMap.put("3", "3"); valueMap.put("5", "5"); @@ -441,9 +442,10 @@ f.setValidateOnChange(true); f.setTitle(MSG.getString(name)); f.addBlurHandler(new BlurHandler() { + @Override public void onBlur(BlurEvent e) { DoubleValidator validator = new DoubleValidator(); - Map errors = e.getForm().getErrors(); + Map<?, ?> errors = e.getForm().getErrors(); if(validator.validate(e.getItem(), errors)) { e.getForm().setErrors(errors, true); }
--- a/flys-client/src/main/java/de/intevation/flys/client/server/StyleHelper.java Wed Jul 25 12:39:13 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/StyleHelper.java Thu Jul 26 10:05:50 2012 +0000 @@ -1,19 +1,14 @@ package de.intevation.flys.client.server; +import de.intevation.flys.client.shared.model.Style; +import de.intevation.flys.client.shared.model.StyleSetting; + import org.w3c.dom.Element; import org.w3c.dom.NodeList; -import org.apache.log4j.Logger; - -import de.intevation.flys.client.shared.model.Style; -import de.intevation.flys.client.shared.model.StyleSetting; - public class StyleHelper { - private static final Logger logger = Logger.getLogger(StyleHelper.class); - - public static Style getStyle (Element element) { if (!element.getTagName().equals("theme")) { return null;
--- a/flys-client/src/main/webapp/WEB-INF/web.xml Wed Jul 25 12:39:13 2012 +0000 +++ b/flys-client/src/main/webapp/WEB-INF/web.xml Thu Jul 26 10:05:50 2012 +0000 @@ -7,13 +7,14 @@ <context-param> <param-name>server-url</param-name> - <param-value>http://localhost:8181</param-value> + <param-value>http://localhost:2323</param-value> </context-param> <context-param> <param-name>authentication</param-name> <param-value>GGInA</param-value> - </context-param> + </context-param> + <!-- Servlets --> <servlet> @@ -498,7 +499,7 @@ <filter-class>de.intevation.flys.client.server.GGInAFilter</filter-class> <init-param> <param-name>deactivate</param-name> - <param-value>false</param-value> + <param-value>true</param-value> </init-param> </filter>