org.geotools.renderer.shape
Class AbstractShape

Object
  extended by AbstractShape
All Implemented Interfaces:
Shape
Direct Known Subclasses:
MultiLineShape, MultiPointShape, PolygonShape

public abstract class AbstractShape
extends Object
implements Shape

An abstract java awt shape that will allow a SimpleGeometry to be drawn using Graphics2D

Since:
2.1.x
Author:
jeichar
Module:

Field Summary
protected  SimpleGeometry geom
           
 
Constructor Summary
AbstractShape(SimpleGeometry geom)
           
 
Method Summary
 boolean contains(double x, double y)
           
 boolean contains(double x, double y, double w, double h)
           
 boolean contains(Point2D p)
           
 boolean contains(Rectangle2D r)
           
 Rectangle getBounds()
           
 Rectangle2D getBounds2D()
           
 boolean intersects(double x, double y, double w, double h)
           
 boolean intersects(Rectangle2D r)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Shape
getPathIterator, getPathIterator
 

Field Detail

geom

protected SimpleGeometry geom
Constructor Detail

AbstractShape

public AbstractShape(SimpleGeometry geom)
Parameters:
geom -
Method Detail

getBounds

public Rectangle getBounds()
Specified by:
getBounds in interface Shape

getBounds2D

public Rectangle2D getBounds2D()
Specified by:
getBounds2D in interface Shape

contains

public boolean contains(double x,
                        double y)
Specified by:
contains in interface Shape

contains

public boolean contains(Point2D p)
Specified by:
contains in interface Shape

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Specified by:
intersects in interface Shape

intersects

public boolean intersects(Rectangle2D r)
Specified by:
intersects in interface Shape

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Specified by:
contains in interface Shape

contains

public boolean contains(Rectangle2D r)
Specified by:
contains in interface Shape


Copyright © 1996-2009 Geotools. All Rights Reserved.