Revision 21425 branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/Point2D.java

View differences:

Point2D.java
56 56

  
57 57
/**
58 58
 * Punto 2D.
59
 * 
59
 *
60 60
 * @author Vicente Caballero Navarro
61 61
 */
62 62
public class Point2D extends AbstractPrimitive implements Point {
......
67 67
	/** Instancia de GeometryType obtenida al registrar esta clase */
68 68
	private static final GeometryType geomType = GeometryManager.getInstance()
69 69
			.registerGeometryType(Point2D.class);
70
	
70

  
71 71
	public static final int CODE = geomType.getType();
72
		
73 72

  
73

  
74 74
	/**
75 75
	 * Crea un nuevo Point2D.
76
	 * 
76
	 *
77 77
	 * @param x
78 78
	 *            Coordenada x del punto.
79 79
	 * @param y
......
109 109
	/**
110 110
	 * Aplica la transformación de la matriz de transformación que se pasa como
111 111
	 * parámetro.
112
	 * 
112
	 *
113 113
	 * @param at
114 114
	 *            Matriz de transformación.
115 115
	 */
......
119 119

  
120 120
	/*
121 121
	 * (non-Javadoc)
122
	 * 
122
	 *
123 123
	 * @see java.awt.Shape#contains(double, double)
124 124
	 */
125 125
	public boolean contains(double x, double y) {
......
132 132

  
133 133
	/*
134 134
	 * (non-Javadoc)
135
	 * 
135
	 *
136 136
	 * @see java.awt.Shape#contains(double, double, double, double)
137 137
	 */
138 138
	public boolean contains(double x, double y, double w, double h) {
......
141 141

  
142 142
	/*
143 143
	 * (non-Javadoc)
144
	 * 
144
	 *
145 145
	 * @see java.awt.Shape#intersects(double, double, double, double)
146 146
	 */
147 147
	public boolean intersects(double x, double y, double w, double h) {
......
152 152

  
153 153
	/*
154 154
	 * (non-Javadoc)
155
	 * 
155
	 *
156 156
	 * @see java.awt.Shape#getBounds()
157 157
	 */
158 158
	public Rectangle getBounds() {
......
161 161

  
162 162
	/**
163 163
	 * Devuelve la coordenada x del punto.
164
	 * 
164
	 *
165 165
	 * @return Coordenada x.
166 166
	 */
167 167
	public double getX() {
......
170 170

  
171 171
	/**
172 172
	 * Devuelve la coordenada y del punto.
173
	 * 
173
	 *
174 174
	 * @return Coordenada y.
175 175
	 */
176 176
	public double getY() {
......
179 179

  
180 180
	/*
181 181
	 * (non-Javadoc)
182
	 * 
182
	 *
183 183
	 * @see java.awt.Shape#contains(java.awt.geom.Point2D)
184 184
	 */
185 185
	public boolean contains(java.awt.geom.Point2D p) {
......
188 188

  
189 189
	/*
190 190
	 * (non-Javadoc)
191
	 * 
191
	 *
192 192
	 * @see java.awt.Shape#getBounds2D()
193 193
	 */
194 194
	public Rectangle2D getBounds2D() {
......
198 198

  
199 199
	/*
200 200
	 * (non-Javadoc)
201
	 * 
201
	 *
202 202
	 * @see java.awt.Shape#contains(java.awt.geom.Rectangle2D)
203 203
	 */
204 204
	public boolean contains(Rectangle2D r) {
......
207 207

  
208 208
	/*
209 209
	 * (non-Javadoc)
210
	 * 
210
	 *
211 211
	 * @see java.awt.Shape#intersects(java.awt.geom.Rectangle2D)
212 212
	 */
213 213
	public boolean intersects(Rectangle2D r) {
......
216 216

  
217 217
	/*
218 218
	 * (non-Javadoc)
219
	 * 
219
	 *
220 220
	 * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform)
221 221
	 */
222 222
	public PathIterator getPathIterator(AffineTransform at) {
......
225 225

  
226 226
	/*
227 227
	 * (non-Javadoc)
228
	 * 
228
	 *
229 229
	 * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform,
230 230
	 *      double)
231 231
	 */
......
239 239
	public int getShapeType() {
240 240
		return FShape.POINT;
241 241
	}
242
	
242

  
243 243
	/**
244 244
	 * Devuelve el tipo de geometría (cte definido en interfaz)
245 245
	 */
......
249 249

  
250 250
	/*
251 251
	 * (non-Javadoc)
252
	 * 
252
	 *
253 253
	 * @see com.iver.cit.gvsig.fmap.core.FShape#cloneFShape()
254 254
	 */
255 255
	public FShape cloneFShape() {
......
258 258

  
259 259
	/*
260 260
	 * (non-Javadoc)
261
	 * 
261
	 *
262 262
	 * @see com.iver.cit.gvsig.fmap.core.FShape#reProject(org.cresques.cts.ICoordTrans)
263 263
	 */
264 264
	public void reProject(ICoordTrans ct) {
......
267 267

  
268 268
	/*
269 269
	 * (non-Javadoc)
270
	 * 
270
	 *
271 271
	 * @see com.iver.cit.gvsig.fmap.core.FShape#getStretchingHandlers()
272 272
	 */
273 273
	public Handler[] getStretchingHandlers() {
......
278 278

  
279 279
	/*
280 280
	 * (non-Javadoc)
281
	 * 
281
	 *
282 282
	 * @see com.iver.cit.gvsig.fmap.core.FShape#getSelectHandlers()
283 283
	 */
284 284
	public Handler[] getSelectHandlers() {
......
289 289

  
290 290
	/**
291 291
	 * DOCUMENT ME!
292
	 * 
292
	 *
293 293
	 * @author Vicente Caballero Navarro
294 294
	 */
295 295
	class PointHandler extends AbstractHandler implements FinalHandler {
296 296
		/**
297 297
		 * Crea un nuevo PointHandler.
298
		 * 
298
		 *
299 299
		 * @param x
300 300
		 *            DOCUMENT ME!
301 301
		 * @param y
......
308 308

  
309 309
		/**
310 310
		 * DOCUMENT ME!
311
		 * 
311
		 *
312 312
		 * @param x
313 313
		 *            DOCUMENT ME!
314 314
		 * @param y
315 315
		 *            DOCUMENT ME!
316
		 * 
316
		 *
317 317
		 * @return DOCUMENT ME!
318 318
		 */
319 319
		public void move(double x, double y) {
......
330 330

  
331 331
	/*
332 332
	 * (non-Javadoc)
333
	 * 
333
	 *
334 334
	 * @see org.gvsig.geometries.iso.GM_Object#coordinateDimension()
335 335
	 */
336 336
	public int getCoordinateDimension() {
......
341 341
		return geomType;
342 342
	}
343 343

  
344
	public Envelope getEnvelope() {
345
		return new DefaultEnvelope(2,new double[]{p.getX() - 0.01, p.getY() - 0.01},new double[]{ p.getX()+0.02,p.getY()+
346
				0.02});
347
	}
348

  
344 349
	public GeneralPathX getGeneralPath() {
345 350
		// TODO Auto-generated method stub
346 351
		return null;

Also available in: Unified diff