comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MapserverStyle.java @ 2616:27cc95e65f18

Defined a style for WSPLGEN layers which are now modifiable. flys-artifacts/trunk@4200 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 05 Apr 2012 07:21:58 +0000
parents 84cf67a2a19e
children
comparison
equal deleted inserted replaced
2615:b0597a63fe70 2616:27cc95e65f18
29 29
30 for (ClazzItem item: items) { 30 for (ClazzItem item: items) {
31 item.toString(sb); 31 item.toString(sb);
32 } 32 }
33 33
34 sb.append("END"); 34 sb.append("END\n");
35 35
36 return sb.toString(); 36 return sb.toString();
37 } 37 }
38 } 38 }
39 39
66 } 66 }
67 67
68 public void toString(StringBuilder sb) { 68 public void toString(StringBuilder sb) {
69 sb.append("STYLE\n"); 69 sb.append("STYLE\n");
70 sb.append("WIDTH " + String.valueOf(size) + "\n"); 70 sb.append("WIDTH " + String.valueOf(size) + "\n");
71 sb.append("OUTLINECOLOR " + outlinecolor + "\n"); 71
72 if (outlinecolor != null) {
73 sb.append("OUTLINECOLOR " + outlinecolor + "\n");
74 }
72 75
73 if (color != null) { 76 if (color != null) {
74 sb.append("COLOR " + color + "\n"); 77 sb.append("COLOR " + color + "\n");
75 } 78 }
76 79
106 sb.append("OFFSET 2 2\n"); 109 sb.append("OFFSET 2 2\n");
107 sb.append("END\n"); 110 sb.append("END\n");
108 } 111 }
109 } 112 }
110 113
114 public static class Expression implements ClazzItem {
115 protected String value;
116
117 public Expression(String value) {
118 this.value = value;
119 }
120
121 @Override
122 public void toString(StringBuilder sb) {
123 sb.append("EXPRESSION " + value);
124 sb.append("\n");
125 }
126 }
127
111 128
112 protected List<Clazz> classes; 129 protected List<Clazz> classes;
113 130
114 131
115 public MapserverStyle() { 132 public MapserverStyle() {

http://dive4elements.wald.intevation.org