Line | Hits | Source |
---|---|---|
1 | // A Java MapScript module for MapServer. | |
2 | // See <http://mapserver.gis.umn.edu> for information on MapServer. | |
3 | // | |
4 | // Copyright (C) 2003 Andrew Collins <andrewrcollins@yahoo.com> | |
5 | // | |
6 | // This library is free software; you can redistribute it | |
7 | // and/or modify it under the terms of the GNU Lesser General | |
8 | // Public License as published by the Free Software Foundation; | |
9 | // either version 2.1 of the License, or (at your option) any | |
10 | // later version. | |
11 | // | |
12 | // This library is distributed in the hope that it will be useful, | |
13 | // but WITHOUT ANY WARRANTY; without even the implied warranty | |
14 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
15 | // See the GNU Lesser General Public License for more details. | |
16 | // | |
17 | // You should have received a copy of the GNU Lesser General | |
18 | // Public License along with this library; if not, write to | |
19 | // the Free Software Foundation, Inc., 59 Temple Place, | |
20 | // Suite 330, Boston, MA 02111-1307 USA | |
21 | package edu.umn.gis.mapscript.imp; | |
22 | ||
23 | /** | |
24 | * DOCUMENT ME! | |
25 | * | |
26 | * @author <a href="mailto:ADDRESS">NAME</a> | |
27 | * | |
28 | * @todo CLASS_DESCRIPTION | |
29 | */ | |
30 | public class shapeObj | |
31 | { | |
32 | /** | |
33 | * DOCUMENT ME! | |
34 | * | |
35 | * @todo FIELD_DESCRIPTION | |
36 | */ | |
37 | protected boolean swigCMemOwn; | |
38 | ||
39 | /** | |
40 | * DOCUMENT ME! | |
41 | * | |
42 | * @todo FIELD_DESCRIPTION | |
43 | */ | |
44 | private long swigCPtr; | |
45 | ||
46 | /** | |
47 | * Creates a new shapeObj object. | |
48 | * | |
49 | * @param type PARAMETER | |
50 | */ | |
51 | public shapeObj(int type) | |
52 | { | |
53 | 0 | this(MapScriptJNI.new_shapeObj(type), true); |
54 | 0 | } |
55 | ||
56 | /** | |
57 | * Creates a new shapeObj object. | |
58 | * | |
59 | * @param cPtr PARAMETER | |
60 | * @param cMemoryOwn PARAMETER | |
61 | */ | |
62 | protected shapeObj(long cPtr, boolean cMemoryOwn) | |
63 | 0 | { |
64 | 0 | swigCMemOwn = cMemoryOwn; |
65 | 0 | swigCPtr = cPtr; |
66 | 0 | } |
67 | ||
68 | /** | |
69 | * Creates a new shapeObj object. | |
70 | */ | |
71 | protected shapeObj() | |
72 | { | |
73 | 0 | this(0, false); |
74 | 0 | } |
75 | ||
76 | /** | |
77 | * DOCUMENT ME! | |
78 | * | |
79 | * @param bounds PARAMETER | |
80 | * | |
81 | * @todo METHOD_DESCRIPTION | |
82 | */ | |
83 | public void setBounds(rectObj bounds) | |
84 | { | |
85 | 0 | MapScriptJNI.set_shapeObj_bounds(swigCPtr, rectObj.getCPtr(bounds)); |
86 | 0 | } |
87 | ||
88 | /** | |
89 | * DOCUMENT ME! | |
90 | * | |
91 | * @todo METHOD_DESCRIPTION | |
92 | */ | |
93 | public void setBounds() | |
94 | { | |
95 | 0 | MapScriptJNI.shapeObj_setBounds(swigCPtr); |
96 | 0 | } |
97 | ||
98 | /** | |
99 | * DOCUMENT ME! | |
100 | * | |
101 | * @return RETURN | |
102 | * | |
103 | * @todo METHOD_DESCRIPTION | |
104 | */ | |
105 | public rectObj getBounds() | |
106 | { | |
107 | 0 | return new rectObj(MapScriptJNI.get_shapeObj_bounds(swigCPtr), false); |
108 | } | |
109 | ||
110 | /** | |
111 | * DOCUMENT ME! | |
112 | * | |
113 | * @param classindex PARAMETER | |
114 | * | |
115 | * @todo METHOD_DESCRIPTION | |
116 | */ | |
117 | public void setClassindex(int classindex) | |
118 | { | |
119 | 0 | MapScriptJNI.set_shapeObj_classindex(swigCPtr, classindex); |
120 | 0 | } |
121 | ||
122 | /** | |
123 | * DOCUMENT ME! | |
124 | * | |
125 | * @return RETURN | |
126 | * | |
127 | * @todo METHOD_DESCRIPTION | |
128 | */ | |
129 | public int getClassindex() | |
130 | { | |
131 | 0 | return MapScriptJNI.get_shapeObj_classindex(swigCPtr); |
132 | } | |
133 | ||
134 | /** | |
135 | * DOCUMENT ME! | |
136 | * | |
137 | * @param index PARAMETER | |
138 | * | |
139 | * @todo METHOD_DESCRIPTION | |
140 | */ | |
141 | public void setIndex(int index) | |
142 | { | |
143 | 0 | MapScriptJNI.set_shapeObj_index(swigCPtr, index); |
144 | 0 | } |
145 | ||
146 | /** | |
147 | * DOCUMENT ME! | |
148 | * | |
149 | * @return RETURN | |
150 | * | |
151 | * @todo METHOD_DESCRIPTION | |
152 | */ | |
153 | public int getIndex() | |
154 | { | |
155 | 0 | return MapScriptJNI.get_shapeObj_index(swigCPtr); |
156 | } | |
157 | ||
158 | /** | |
159 | * DOCUMENT ME! | |
160 | * | |
161 | * @param line PARAMETER | |
162 | * | |
163 | * @todo METHOD_DESCRIPTION | |
164 | */ | |
165 | public void setLine(lineObj line) | |
166 | { | |
167 | 0 | MapScriptJNI.set_shapeObj_line(swigCPtr, lineObj.getCPtr(line)); |
168 | 0 | } |
169 | ||
170 | /** | |
171 | * DOCUMENT ME! | |
172 | * | |
173 | * @return RETURN | |
174 | * | |
175 | * @todo METHOD_DESCRIPTION | |
176 | */ | |
177 | public lineObj getLine() | |
178 | { | |
179 | 0 | return new lineObj(MapScriptJNI.get_shapeObj_line(swigCPtr), false); |
180 | } | |
181 | ||
182 | /** | |
183 | * DOCUMENT ME! | |
184 | * | |
185 | * @param numlines PARAMETER | |
186 | * | |
187 | * @todo METHOD_DESCRIPTION | |
188 | */ | |
189 | public void setNumlines(int numlines) | |
190 | { | |
191 | 0 | MapScriptJNI.set_shapeObj_numlines(swigCPtr, numlines); |
192 | 0 | } |
193 | ||
194 | /** | |
195 | * DOCUMENT ME! | |
196 | * | |
197 | * @return RETURN | |
198 | * | |
199 | * @todo METHOD_DESCRIPTION | |
200 | */ | |
201 | public int getNumlines() | |
202 | { | |
203 | 0 | return MapScriptJNI.get_shapeObj_numlines(swigCPtr); |
204 | } | |
205 | ||
206 | /** | |
207 | * DOCUMENT ME! | |
208 | * | |
209 | * @param numvalues PARAMETER | |
210 | * | |
211 | * @todo METHOD_DESCRIPTION | |
212 | */ | |
213 | public void setNumvalues(int numvalues) | |
214 | { | |
215 | 0 | MapScriptJNI.set_shapeObj_numvalues(swigCPtr, numvalues); |
216 | 0 | } |
217 | ||
218 | /** | |
219 | * DOCUMENT ME! | |
220 | * | |
221 | * @return RETURN | |
222 | * | |
223 | * @todo METHOD_DESCRIPTION | |
224 | */ | |
225 | public int getNumvalues() | |
226 | { | |
227 | 0 | return MapScriptJNI.get_shapeObj_numvalues(swigCPtr); |
228 | } | |
229 | ||
230 | /** | |
231 | * DOCUMENT ME! | |
232 | * | |
233 | * @param text PARAMETER | |
234 | * | |
235 | * @todo METHOD_DESCRIPTION | |
236 | */ | |
237 | public void setText(String text) | |
238 | { | |
239 | 0 | MapScriptJNI.set_shapeObj_text(swigCPtr, text); |
240 | 0 | } |
241 | ||
242 | /** | |
243 | * DOCUMENT ME! | |
244 | * | |
245 | * @return RETURN | |
246 | * | |
247 | * @todo METHOD_DESCRIPTION | |
248 | */ | |
249 | public String getText() | |
250 | { | |
251 | 0 | return MapScriptJNI.get_shapeObj_text(swigCPtr); |
252 | } | |
253 | ||
254 | /** | |
255 | * DOCUMENT ME! | |
256 | * | |
257 | * @param tileindex PARAMETER | |
258 | * | |
259 | * @todo METHOD_DESCRIPTION | |
260 | */ | |
261 | public void setTileindex(int tileindex) | |
262 | { | |
263 | 0 | MapScriptJNI.set_shapeObj_tileindex(swigCPtr, tileindex); |
264 | 0 | } |
265 | ||
266 | /** | |
267 | * DOCUMENT ME! | |
268 | * | |
269 | * @return RETURN | |
270 | * | |
271 | * @todo METHOD_DESCRIPTION | |
272 | */ | |
273 | public int getTileindex() | |
274 | { | |
275 | 0 | return MapScriptJNI.get_shapeObj_tileindex(swigCPtr); |
276 | } | |
277 | ||
278 | /** | |
279 | * DOCUMENT ME! | |
280 | * | |
281 | * @param type PARAMETER | |
282 | * | |
283 | * @todo METHOD_DESCRIPTION | |
284 | */ | |
285 | public void setType(int type) | |
286 | { | |
287 | 0 | MapScriptJNI.set_shapeObj_type(swigCPtr, type); |
288 | 0 | } |
289 | ||
290 | /** | |
291 | * DOCUMENT ME! | |
292 | * | |
293 | * @return RETURN | |
294 | * | |
295 | * @todo METHOD_DESCRIPTION | |
296 | */ | |
297 | public int getType() | |
298 | { | |
299 | 0 | return MapScriptJNI.get_shapeObj_type(swigCPtr); |
300 | } | |
301 | ||
302 | /** | |
303 | * DOCUMENT ME! | |
304 | * | |
305 | * @param i PARAMETER | |
306 | * | |
307 | * @return RETURN | |
308 | * | |
309 | * @todo METHOD_DESCRIPTION | |
310 | */ | |
311 | public String getValue(int i) | |
312 | { | |
313 | 0 | return MapScriptJNI.shapeObj_getValue(swigCPtr, i); |
314 | } | |
315 | ||
316 | /** | |
317 | * DOCUMENT ME! | |
318 | * | |
319 | * @param values PARAMETER | |
320 | * | |
321 | * @todo METHOD_DESCRIPTION | |
322 | */ | |
323 | public void setValues(SWIGTYPE_p_p_char values) | |
324 | { | |
325 | 0 | MapScriptJNI.set_shapeObj_values(swigCPtr, SWIGTYPE_p_p_char.getCPtr(values)); |
326 | 0 | } |
327 | ||
328 | /** | |
329 | * DOCUMENT ME! | |
330 | * | |
331 | * @return RETURN | |
332 | * | |
333 | * @todo METHOD_DESCRIPTION | |
334 | */ | |
335 | public SWIGTYPE_p_p_char getValues() | |
336 | { | |
337 | 0 | return new SWIGTYPE_p_p_char(MapScriptJNI.get_shapeObj_values(swigCPtr), |
338 | false); | |
339 | } | |
340 | ||
341 | /** | |
342 | * DOCUMENT ME! | |
343 | * | |
344 | * @param line PARAMETER | |
345 | * | |
346 | * @return RETURN | |
347 | * | |
348 | * @todo METHOD_DESCRIPTION | |
349 | */ | |
350 | public int add(lineObj line) | |
351 | { | |
352 | 0 | return MapScriptJNI.shapeObj_add(swigCPtr, lineObj.getCPtr(line)); |
353 | } | |
354 | ||
355 | /** | |
356 | * DOCUMENT ME! | |
357 | * | |
358 | * @param point PARAMETER | |
359 | * | |
360 | * @return RETURN | |
361 | * | |
362 | * @todo METHOD_DESCRIPTION | |
363 | */ | |
364 | public int contains(pointObj point) | |
365 | { | |
366 | 0 | return MapScriptJNI.shapeObj_contains(swigCPtr, pointObj.getCPtr(point)); |
367 | } | |
368 | ||
369 | /** | |
370 | * DOCUMENT ME! | |
371 | * | |
372 | * @param dest PARAMETER | |
373 | * | |
374 | * @return RETURN | |
375 | * | |
376 | * @todo METHOD_DESCRIPTION | |
377 | */ | |
378 | public int copy(shapeObj dest) | |
379 | { | |
380 | 0 | return MapScriptJNI.shapeObj_copy(swigCPtr, shapeObj.getCPtr(dest)); |
381 | } | |
382 | ||
383 | /** | |
384 | * DOCUMENT ME! | |
385 | * | |
386 | * @todo METHOD_DESCRIPTION | |
387 | */ | |
388 | public void delete() | |
389 | { | |
390 | 0 | if ((swigCPtr != 0) && swigCMemOwn) |
391 | { | |
392 | 0 | MapScriptJNI.delete_shapeObj(swigCPtr); |
393 | 0 | swigCMemOwn = false; |
394 | } | |
395 | ||
396 | 0 | swigCPtr = 0; |
397 | 0 | } |
398 | ||
399 | /** | |
400 | * DOCUMENT ME! | |
401 | * | |
402 | * @param map PARAMETER | |
403 | * @param layer PARAMETER | |
404 | * @param image PARAMETER | |
405 | * | |
406 | * @return RETURN | |
407 | * | |
408 | * @todo METHOD_DESCRIPTION | |
409 | */ | |
410 | public int draw(mapObj map, layerObj layer, imageObj image) | |
411 | { | |
412 | 0 | return MapScriptJNI.shapeObj_draw(swigCPtr, mapObj.getCPtr(map), |
413 | layerObj.getCPtr(layer), imageObj.getCPtr(image)); | |
414 | } | |
415 | ||
416 | /** | |
417 | * DOCUMENT ME! | |
418 | * | |
419 | * @param obj PARAMETER | |
420 | * | |
421 | * @return RETURN | |
422 | * | |
423 | * @todo METHOD_DESCRIPTION | |
424 | */ | |
425 | public boolean equals(Object obj) | |
426 | { | |
427 | 0 | boolean equal = false; |
428 | ||
429 | 0 | if (obj instanceof shapeObj) |
430 | { | |
431 | 0 | equal = (((shapeObj) obj).swigCPtr == this.swigCPtr); |
432 | } | |
433 | ||
434 | 0 | return equal; |
435 | } | |
436 | ||
437 | /** | |
438 | * DOCUMENT ME! | |
439 | * | |
440 | * @param i PARAMETER | |
441 | * | |
442 | * @return RETURN | |
443 | * | |
444 | * @todo METHOD_DESCRIPTION | |
445 | */ | |
446 | public lineObj get(int i) | |
447 | { | |
448 | 0 | return new lineObj(MapScriptJNI.shapeObj_get(swigCPtr, i), false); |
449 | } | |
450 | ||
451 | /** | |
452 | * DOCUMENT ME! | |
453 | * | |
454 | * @param shape PARAMETER | |
455 | * | |
456 | * @return RETURN | |
457 | * | |
458 | * @todo METHOD_DESCRIPTION | |
459 | */ | |
460 | public int intersects(shapeObj shape) | |
461 | { | |
462 | 0 | return MapScriptJNI.shapeObj_intersects(swigCPtr, shapeObj.getCPtr(shape)); |
463 | } | |
464 | ||
465 | /** | |
466 | * DOCUMENT ME! | |
467 | * | |
468 | * @param in PARAMETER | |
469 | * @param out PARAMETER | |
470 | * | |
471 | * @return RETURN | |
472 | * | |
473 | * @todo METHOD_DESCRIPTION | |
474 | */ | |
475 | public int project(projectionObj in, projectionObj out) | |
476 | { | |
477 | 0 | return MapScriptJNI.shapeObj_project(swigCPtr, projectionObj.getCPtr(in), |
478 | projectionObj.getCPtr(out)); | |
479 | } | |
480 | ||
481 | /** | |
482 | * DOCUMENT ME! | |
483 | * | |
484 | * @param obj PARAMETER | |
485 | * | |
486 | * @return RETURN | |
487 | * | |
488 | * @todo METHOD_DESCRIPTION | |
489 | */ | |
490 | protected static long getCPtr(shapeObj obj) | |
491 | { | |
492 | 0 | return obj.swigCPtr; |
493 | } | |
494 | ||
495 | /** | |
496 | * DOCUMENT ME! | |
497 | * | |
498 | * @todo METHOD_DESCRIPTION | |
499 | */ | |
500 | protected void finalize() | |
501 | { | |
502 | 0 | delete(); |
503 | 0 | } |
504 | } |
this report was generated by version 1.0.2 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |