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 pointObj | |
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 pointObj object. | |
48 | */ | |
49 | public pointObj() | |
50 | { | |
51 | 0 | this(MapScriptJNI.new_pointObj(), true); |
52 | 0 | } |
53 | ||
54 | /** | |
55 | * Creates a new pointObj object. | |
56 | * | |
57 | * @param cPtr PARAMETER | |
58 | * @param cMemoryOwn PARAMETER | |
59 | */ | |
60 | protected pointObj(long cPtr, boolean cMemoryOwn) | |
61 | 0 | { |
62 | 0 | swigCMemOwn = cMemoryOwn; |
63 | 0 | swigCPtr = cPtr; |
64 | 0 | } |
65 | ||
66 | /** | |
67 | * DOCUMENT ME! | |
68 | * | |
69 | * @param m PARAMETER | |
70 | * | |
71 | * @todo METHOD_DESCRIPTION | |
72 | */ | |
73 | public void setM(double m) | |
74 | { | |
75 | 0 | MapScriptJNI.set_pointObj_m(swigCPtr, m); |
76 | 0 | } |
77 | ||
78 | /** | |
79 | * DOCUMENT ME! | |
80 | * | |
81 | * @return RETURN | |
82 | * | |
83 | * @todo METHOD_DESCRIPTION | |
84 | */ | |
85 | public double getM() | |
86 | { | |
87 | 0 | return MapScriptJNI.get_pointObj_m(swigCPtr); |
88 | } | |
89 | ||
90 | /** | |
91 | * DOCUMENT ME! | |
92 | * | |
93 | * @param x PARAMETER | |
94 | * | |
95 | * @todo METHOD_DESCRIPTION | |
96 | */ | |
97 | public void setX(double x) | |
98 | { | |
99 | 0 | MapScriptJNI.set_pointObj_x(swigCPtr, x); |
100 | 0 | } |
101 | ||
102 | /** | |
103 | * DOCUMENT ME! | |
104 | * | |
105 | * @return RETURN | |
106 | * | |
107 | * @todo METHOD_DESCRIPTION | |
108 | */ | |
109 | public double getX() | |
110 | { | |
111 | 0 | return MapScriptJNI.get_pointObj_x(swigCPtr); |
112 | } | |
113 | ||
114 | /** | |
115 | * DOCUMENT ME! | |
116 | * | |
117 | * @param y PARAMETER | |
118 | * | |
119 | * @todo METHOD_DESCRIPTION | |
120 | */ | |
121 | public void setY(double y) | |
122 | { | |
123 | 0 | MapScriptJNI.set_pointObj_y(swigCPtr, y); |
124 | 0 | } |
125 | ||
126 | /** | |
127 | * DOCUMENT ME! | |
128 | * | |
129 | * @return RETURN | |
130 | * | |
131 | * @todo METHOD_DESCRIPTION | |
132 | */ | |
133 | public double getY() | |
134 | { | |
135 | 0 | return MapScriptJNI.get_pointObj_y(swigCPtr); |
136 | } | |
137 | ||
138 | /** | |
139 | * DOCUMENT ME! | |
140 | * | |
141 | * @todo METHOD_DESCRIPTION | |
142 | */ | |
143 | public void delete() | |
144 | { | |
145 | 0 | if ((swigCPtr != 0) && swigCMemOwn) |
146 | { | |
147 | 0 | MapScriptJNI.delete_pointObj(swigCPtr); |
148 | 0 | swigCMemOwn = false; |
149 | } | |
150 | ||
151 | 0 | swigCPtr = 0; |
152 | 0 | } |
153 | ||
154 | /** | |
155 | * DOCUMENT ME! | |
156 | * | |
157 | * @param a PARAMETER | |
158 | * @param b PARAMETER | |
159 | * | |
160 | * @return RETURN | |
161 | * | |
162 | * @todo METHOD_DESCRIPTION | |
163 | */ | |
164 | public double distanceToLine(pointObj a, pointObj b) | |
165 | { | |
166 | 0 | return MapScriptJNI.pointObj_distanceToLine(swigCPtr, pointObj.getCPtr(a), |
167 | pointObj.getCPtr(b)); | |
168 | } | |
169 | ||
170 | /** | |
171 | * DOCUMENT ME! | |
172 | * | |
173 | * @param point PARAMETER | |
174 | * | |
175 | * @return RETURN | |
176 | * | |
177 | * @todo METHOD_DESCRIPTION | |
178 | */ | |
179 | public double distanceToPoint(pointObj point) | |
180 | { | |
181 | 0 | return MapScriptJNI.pointObj_distanceToPoint(swigCPtr, |
182 | pointObj.getCPtr(point)); | |
183 | } | |
184 | ||
185 | /** | |
186 | * DOCUMENT ME! | |
187 | * | |
188 | * @param shape PARAMETER | |
189 | * | |
190 | * @return RETURN | |
191 | * | |
192 | * @todo METHOD_DESCRIPTION | |
193 | */ | |
194 | public double distanceToShape(shapeObj shape) | |
195 | { | |
196 | 0 | return MapScriptJNI.pointObj_distanceToShape(swigCPtr, |
197 | shapeObj.getCPtr(shape)); | |
198 | } | |
199 | ||
200 | /** | |
201 | * DOCUMENT ME! | |
202 | * | |
203 | * @param map PARAMETER | |
204 | * @param layer PARAMETER | |
205 | * @param image PARAMETER | |
206 | * @param classindex PARAMETER | |
207 | * @param text PARAMETER | |
208 | * | |
209 | * @return RETURN | |
210 | * | |
211 | * @todo METHOD_DESCRIPTION | |
212 | */ | |
213 | public int draw(mapObj map, layerObj layer, imageObj image, int classindex, | |
214 | String text) | |
215 | { | |
216 | 0 | return MapScriptJNI.pointObj_draw(swigCPtr, mapObj.getCPtr(map), |
217 | layerObj.getCPtr(layer), imageObj.getCPtr(image), classindex, text); | |
218 | } | |
219 | ||
220 | /** | |
221 | * DOCUMENT ME! | |
222 | * | |
223 | * @param obj PARAMETER | |
224 | * | |
225 | * @return RETURN | |
226 | * | |
227 | * @todo METHOD_DESCRIPTION | |
228 | */ | |
229 | public boolean equals(Object obj) | |
230 | { | |
231 | 0 | boolean equal = false; |
232 | ||
233 | 0 | if (obj instanceof pointObj) |
234 | { | |
235 | 0 | equal = (((pointObj) obj).swigCPtr == this.swigCPtr); |
236 | } | |
237 | ||
238 | 0 | return equal; |
239 | } | |
240 | ||
241 | /** | |
242 | * DOCUMENT ME! | |
243 | * | |
244 | * @param in PARAMETER | |
245 | * @param out PARAMETER | |
246 | * | |
247 | * @return RETURN | |
248 | * | |
249 | * @todo METHOD_DESCRIPTION | |
250 | */ | |
251 | public int project(projectionObj in, projectionObj out) | |
252 | { | |
253 | 0 | return MapScriptJNI.pointObj_project(swigCPtr, projectionObj.getCPtr(in), |
254 | projectionObj.getCPtr(out)); | |
255 | } | |
256 | ||
257 | /** | |
258 | * DOCUMENT ME! | |
259 | * | |
260 | * @param obj PARAMETER | |
261 | * | |
262 | * @return RETURN | |
263 | * | |
264 | * @todo METHOD_DESCRIPTION | |
265 | */ | |
266 | protected static long getCPtr(pointObj obj) | |
267 | { | |
268 | 0 | return obj.swigCPtr; |
269 | } | |
270 | ||
271 | /** | |
272 | * DOCUMENT ME! | |
273 | * | |
274 | * @todo METHOD_DESCRIPTION | |
275 | */ | |
276 | protected void finalize() | |
277 | { | |
278 | 0 | delete(); |
279 | 0 | } |
280 | } |
this report was generated by version 1.0.2 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |