es.prodevelop.gvsig.mobile.fmap.core
Class FPolygon2D

java.lang.Object
  extended byes.prodevelop.gvsig.mobile.fmap.core.FPolyline2D
      extended byes.prodevelop.gvsig.mobile.fmap.core.FPolygon2D
All Implemented Interfaces:
FShape, java.io.Serializable, java.awt.Shape
Direct Known Subclasses:
FCircle2D, FEllipse2D, FPolygon3D

public class FPolygon2D
extends FPolyline2D

Polígono 2D.

Author:
Vicente Caballero Navarro
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface es.prodevelop.gvsig.mobile.fmap.core.FShape
ARC, CIRCLE, ELLIPSE, LINE, MULTI, MULTIPOINT, NULL, POINT, POLYGON, TEXT, Z
 
Constructor Summary
FPolygon2D(GeneralPathX gpx)
          Crea un nuevo Polygon2D.
 
Method Summary
 FShape cloneFShape()
          Clona FPolygon2D.
 int getShapeType()
          Obtiene el tipo de shape que contiene.
 boolean intersects(java.awt.geom.Rectangle2D r)
          El método intersects de java.awt.Shape que define la intersección entre una polilínea y un Rectangle2D considera la polilínea como un Shape genérico y se producen errores en la selección de polilíneas.
 
Methods inherited from class es.prodevelop.gvsig.mobile.fmap.core.FPolyline2D
contains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, getSelectHandlers, getStretchingHandlers, intersects, reProject, transform
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FPolygon2D

public FPolygon2D(GeneralPathX gpx)
Crea un nuevo Polygon2D.

Parameters:
gpx - GeneralPathX.
Method Detail

getShapeType

public int getShapeType()
Description copied from interface: FShape
Obtiene el tipo de shape que contiene. Puede ser una de las constantes POINT, LINE o POLYGON

Specified by:
getShapeType in interface FShape
Overrides:
getShapeType in class FPolyline2D
See Also:
com.iver.cit.gvsig.fmap.core.FShape#getShapeType()

cloneFShape

public FShape cloneFShape()
Clona FPolygon2D.

Specified by:
cloneFShape in interface FShape
Overrides:
cloneFShape in class FPolyline2D
Returns:
FShape clonado.

intersects

public boolean intersects(java.awt.geom.Rectangle2D r)
Description copied from class: FPolyline2D
El método intersects de java.awt.Shape que define la intersección entre una polilínea y un Rectangle2D considera la polilínea como un Shape genérico y se producen errores en la selección de polilíneas. Por este motivo se ha modificado este método intersect() de FPolyline2D para que realize la intersección estricta entre el Rectangle2D y la polilínea en cuestión. El precio es un incremento de tiempo máximo del 50%.

Specified by:
intersects in interface FShape
Overrides:
intersects in class FPolyline2D
Parameters:
r - Rectángulo.
Returns:
True si intersecta con el rectangulo que se pasa como parámetro.