org.geotools.renderer.style.shape
Class ExplicitBoundsShape

java.lang.Object
  extended by org.geotools.renderer.style.shape.ExplicitBoundsShape
All Implemented Interfaces:
java.awt.Shape

public class ExplicitBoundsShape
extends java.lang.Object
implements java.awt.Shape

Decorator on top of the Shape. It extends the Shape interface to include a method 'setBounds' for explicitly defining a bounding box (which is not necessarily associated with the actual shape's bounds).

Author:
fmoura

Constructor Summary
ExplicitBoundsShape(java.awt.Shape shape)
          The Constructor
 
Method Summary
 boolean contains(double x, double y)
           
 boolean contains(double x, double y, double w, double h)
           
 boolean contains(java.awt.geom.Point2D p)
           
 boolean contains(java.awt.geom.Rectangle2D r)
           
 boolean equals(java.lang.Object obj)
           
 java.awt.Rectangle getBounds()
          Returns the explicitly defined bounds for this shape.
 java.awt.geom.Rectangle2D getBounds2D()
          Returns the explicitly defined bounds for this shape.
 java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
           
 java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
           
 int hashCode()
           
 boolean intersects(double x, double y, double w, double h)
           
 boolean intersects(java.awt.geom.Rectangle2D r)
           
 void setBounds(java.awt.geom.Rectangle2D bounds)
          Sets the explicitly defined bounds for this shape.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExplicitBoundsShape

public ExplicitBoundsShape(java.awt.Shape shape)
The Constructor

Parameters:
shape - The actual shape on top of which this decorator will stand.
Method Detail

setBounds

public void setBounds(java.awt.geom.Rectangle2D bounds)
Sets the explicitly defined bounds for this shape.

Parameters:
bounds -

contains

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

contains

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

contains

public boolean contains(java.awt.geom.Point2D p)
Specified by:
contains in interface java.awt.Shape

contains

public boolean contains(java.awt.geom.Rectangle2D r)
Specified by:
contains in interface java.awt.Shape

getBounds

public java.awt.Rectangle getBounds()
Returns the explicitly defined bounds for this shape. If no bounds were explicitly set, it delegates the call to the actual shape.

Specified by:
getBounds in interface java.awt.Shape
Returns:
the Rectangle representing the Shape's bounding box.
See Also:
Shape

getBounds2D

public java.awt.geom.Rectangle2D getBounds2D()
Returns the explicitly defined bounds for this shape. If no bounds were explicitly set, it delegates the call to the actual shape.

Specified by:
getBounds2D in interface java.awt.Shape
Returns:
the Rectangle2D representing the Shape's bounding box.
See Also:
Shape

getPathIterator

public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at,
                                                  double flatness)
Specified by:
getPathIterator in interface java.awt.Shape

getPathIterator

public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
Specified by:
getPathIterator in interface java.awt.Shape

intersects

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

intersects

public boolean intersects(java.awt.geom.Rectangle2D r)
Specified by:
intersects in interface java.awt.Shape

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 1996-2014 Geotools. All Rights Reserved.