changeset 8913:924cd9943337

Configured some real fill patterns
author gernotbelger
date Mon, 26 Feb 2018 18:10:03 +0100
parents 837c04af69fd
children e3519c3e7a0a 87aa705e1e99
files artifacts/doc/conf/themes/default.xml artifacts/doc/conf/themes/second.xml artifacts/src/main/java/org/dive4elements/river/jfree/AreaFillPattern.java artifacts/src/main/java/org/dive4elements/river/jfree/StyledAreaSeriesCollection.java artifacts/src/main/resources/images/areapatterns/paternCross.png artifacts/src/main/resources/images/areapatterns/pattern1.png artifacts/src/main/resources/images/areapatterns/patternDagonalLeft.png artifacts/src/main/resources/images/areapatterns/patternDiagonalRight.png artifacts/src/main/resources/images/areapatterns/patternPoints.png gwt-client/src/main/java/org/dive4elements/river/client/client/ui/StyleEditorWindow.java gwt-client/src/main/webapp/images/areapattern-paternCross.png gwt-client/src/main/webapp/images/areapattern-pattern1.png gwt-client/src/main/webapp/images/areapattern-patternDagonalLeft.png gwt-client/src/main/webapp/images/areapattern-patternDiagonalRight.png gwt-client/src/main/webapp/images/areapattern-patternFill.png gwt-client/src/main/webapp/images/areapattern-patternPoints.png gwt-client/src/main/webapp/images/areapattern-x.png
diffstat 17 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/themes/default.xml	Mon Feb 26 18:09:52 2018 +0100
+++ b/artifacts/doc/conf/themes/default.xml	Mon Feb 26 18:10:03 2018 +0100
@@ -2905,7 +2905,7 @@
 
             <field name="showarea" type="boolean" display="Flaeche anzeigen" default="true" />
             <field name="areabgcolor" type="Color" default="245, 245, 220" display="Füllfarbe" />            
-            <field name="areabgpattern" type="areapattern" default="pattern1" display="Flächenfarbe" />            
+            <field name="areabgpattern" type="areapattern" default="patternFill" display="Flächentyp" />            
             <field name="areatransparency" type="int" default="10"  />
 
             <field name="showarealabel" type="boolean" display="Flächenbeschriftung anzeigen" default="false" hint="hidden"/>
--- a/artifacts/doc/conf/themes/second.xml	Mon Feb 26 18:09:52 2018 +0100
+++ b/artifacts/doc/conf/themes/second.xml	Mon Feb 26 18:10:03 2018 +0100
@@ -2894,7 +2894,7 @@
 
             <field name="showarea" type="boolean" display="Flaeche anzeigen" default="true" />
             <field name="areabgcolor" type="Color" default="245, 245, 220" display="Füllfarbe" />            
-            <field name="areabgpattern" type="areapattern" default="pattern1" display="Flächenfarbe" />            
+            <field name="areabgpattern" type="areapattern" default="patternFill" display="Flächentyp" />            
             <field name="areatransparency" type="int" default="10"  />
 
             <field name="showarealabel" type="boolean" display="Flächenbeschriftung anzeigen" default="false" hint="hidden"/>
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/AreaFillPattern.java	Mon Feb 26 18:09:52 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/jfree/AreaFillPattern.java	Mon Feb 26 18:10:03 2018 +0100
@@ -27,7 +27,11 @@
  */
 public enum AreaFillPattern {
 
-    pattern1("/images/areapatterns/pattern1.png");
+    patternFill("/images/areapatterns/patternFill.png"), //
+    patternPoints("/images/areapatterns/patternPoints.png"), //
+    paternCross("/images/areapatterns/paternCross.png"), //
+    patternDagonalLeft("/images/areapatterns/patternDagonalLeft.png"), //
+    patternDiagonalRight("/images/areapatterns/patternDiagonalRight.png");
 
     private static Logger log = Logger.getLogger(AreaFillPattern.class);
 
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/StyledAreaSeriesCollection.java	Mon Feb 26 18:09:52 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/jfree/StyledAreaSeriesCollection.java	Mon Feb 26 18:10:03 2018 +0100
@@ -132,7 +132,7 @@
         
         final AreaFillPattern pattern = this.theme.parseAreaBackgroundPattern();
 
-        if( pattern == null )
+        if( pattern == null || pattern == AreaFillPattern.patternFill )
             return alphaPaint;
         
         final BufferedImage image = pattern.getImage(alphaPaint);
Binary file artifacts/src/main/resources/images/areapatterns/paternCross.png has changed
Binary file artifacts/src/main/resources/images/areapatterns/pattern1.png has changed
Binary file artifacts/src/main/resources/images/areapatterns/patternDagonalLeft.png has changed
Binary file artifacts/src/main/resources/images/areapatterns/patternDiagonalRight.png has changed
Binary file artifacts/src/main/resources/images/areapatterns/patternPoints.png has changed
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/StyleEditorWindow.java	Mon Feb 26 18:09:52 2018 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/StyleEditorWindow.java	Mon Feb 26 18:10:03 2018 +0100
@@ -605,7 +605,12 @@
 
         // FIXME: ugly, using knowledge of available patterns at this point, creating redundancy with AreaFillPattern enum.
         // But the whole code does it like that, so this is 'flys style'
-        final String[] patterns = new String[] {"pattern1", "x"};
+        final String[] patterns = new String[] {"patternFill", //
+                                                "patternPoints", //
+                                                "paternCross", //
+                                                "patternDagonalLeft", //
+                                                "patternDiagonalRight"};
+
         for (int i = 0; i < patterns.length; i++) {
             final String pattern = patterns[i];
 
Binary file gwt-client/src/main/webapp/images/areapattern-paternCross.png has changed
Binary file gwt-client/src/main/webapp/images/areapattern-pattern1.png has changed
Binary file gwt-client/src/main/webapp/images/areapattern-patternDagonalLeft.png has changed
Binary file gwt-client/src/main/webapp/images/areapattern-patternDiagonalRight.png has changed
Binary file gwt-client/src/main/webapp/images/areapattern-patternFill.png has changed
Binary file gwt-client/src/main/webapp/images/areapattern-patternPoints.png has changed
Binary file gwt-client/src/main/webapp/images/areapattern-x.png has changed

http://dive4elements.wald.intevation.org