1
2
3
4
5
6 package nl.javel.gisbeans.map;
7
8 import java.awt.Color;
9 import java.util.List;
10
11 import nl.javel.gisbeans.io.DataSourceInterface;
12
13 /***
14 * This interface defines the image as defined in the mapInterface
15 *
16 * @author <a href="mailto:paul.jacobs@javel.nl">Paul Jacobs </a>
17 * @since JDK 1.0
18 * @version 1.0
19 */
20 public class Layer implements LayerInterface
21 {
22 /*** the fillColor of the layer */
23 private Color fillColor = new Color(255, 255, 255, 255);
24
25 /*** the dataSource to use */
26 private DataSourceInterface dataSource;
27
28 /*** the maxScale */
29 private int maxScale = 0;
30
31 /*** the minScale */
32 private int minScale = Integer.MAX_VALUE;
33
34 /*** the outlineColor */
35 private Color outlineColor = Color.BLACK;
36
37 /*** the name of the layer */
38 private String name;
39
40 /*** the status */
41 private boolean status = true;
42
43 /*** whether to transform */
44 private boolean transform = false;
45
46 /*** the attributes of the layer */
47 private List attributes;
48
49 /*** the symbols of the layer */
50 private List symbols;
51
52 /***
53 * constructs a new layer
54 */
55 public Layer()
56 {
57 super();
58 }
59
60 /***
61 * @see nl.javel.gisbeans.map.LayerInterface#getSymbols()
62 */
63 public List getSymbols()
64 {
65 return this.symbols;
66 }
67
68 /***
69 * @see nl.javel.gisbeans.map.LayerInterface#getAttributes()
70 */
71 public List getAttributes()
72 {
73 return this.attributes;
74 }
75
76 /***
77 * @see nl.javel.gisbeans.map.LayerInterface#getAttribute(int)
78 */
79 public AttributeInterface getAttribute(int index)
80 {
81 return (AttributeInterface) this.attributes.get(index);
82 }
83
84 /***
85 * @see LayerInterface#getColor()
86 */
87 public Color getColor()
88 {
89 return this.fillColor;
90 }
91
92 /***
93 * @see LayerInterface#setColor(Color)
94 */
95 public void setColor(Color color)
96 {
97 this.fillColor = color;
98 }
99
100 /***
101 * @see LayerInterface#getDataSource()
102 */
103 public DataSourceInterface getDataSource()
104 {
105 return this.dataSource;
106 }
107
108 /***
109 * @see LayerInterface#setAttributes(List attributes)
110 */
111 public void setAttributes(List attributes)
112 {
113 this.attributes = attributes;
114 }
115
116 /***
117 * @see LayerInterface#setDataSource(nl.javel.gisbeans.io.DataSourceInterface)
118 */
119 public void setDataSource(DataSourceInterface dataSource)
120 {
121 this.dataSource = dataSource;
122 }
123
124 /***
125 * @see LayerInterface#getMaxScale()
126 */
127 public int getMaxScale()
128 {
129 return this.maxScale;
130 }
131
132 /***
133 * @see LayerInterface#setMaxScale(int)
134 */
135 public void setMaxScale(int maxScale)
136 {
137 this.maxScale = maxScale;
138 }
139
140 /***
141 * @see LayerInterface#getMinScale()
142 */
143 public int getMinScale()
144 {
145 return this.minScale;
146 }
147
148 /***
149 * @see LayerInterface#setMinScale(int)
150 */
151 public void setMinScale(int minScale)
152 {
153 this.minScale = minScale;
154 }
155
156 /***
157 * @see LayerInterface#getName()
158 */
159 public String getName()
160 {
161 return this.name;
162 }
163
164 /***
165 * @see LayerInterface#setName(String)
166 */
167 public void setName(String name)
168 {
169 this.name = name;
170 }
171
172 /***
173 * @see LayerInterface#getOutlineColor()
174 */
175 public Color getOutlineColor()
176 {
177 return this.outlineColor;
178 }
179
180 /***
181 * @see LayerInterface#setOutlineColor(Color)
182 */
183 public void setOutlineColor(Color outlineColor)
184 {
185 this.outlineColor = outlineColor;
186 }
187
188 /***
189 * @see LayerInterface#isStatus()
190 */
191 public boolean isStatus()
192 {
193 return this.status;
194 }
195
196 /***
197 * @see LayerInterface#setStatus(boolean)
198 */
199 public void setStatus(boolean status)
200 {
201 this.status = status;
202 }
203
204 /***
205 * @see LayerInterface#isTransform()
206 */
207 public boolean isTransform()
208 {
209 return this.transform;
210 }
211
212 /***
213 * @see LayerInterface#setTransform(boolean)
214 */
215 public void setTransform(boolean transform)
216 {
217 this.transform = transform;
218 }
219
220 /***
221 * Sets the symbols.
222 *
223 * @param symbols The symbols to set
224 */
225 public void setSymbols(final List symbols)
226 {
227 this.symbols = symbols;
228 }
229 }