org.graffiti.plugins.views.defaults
Class RectangularNodeShape

java.lang.Object
  extended by org.graffiti.plugins.views.defaults.AbstractArrowShape
      extended by org.graffiti.plugins.views.defaults.RectangularNodeShape
All Implemented Interfaces:
Shape, ArrowShape, GraffitiShape, GraphElementShape, NodeShape
Direct Known Subclasses:
CircularNodeShape, RectangleNodeShape

public abstract class RectangularNodeShape
extends AbstractArrowShape
implements NodeShape

An implementation of NodeShape representing rectangular shapes.


Constructor Summary
RectangularNodeShape()
           
 
Method Summary
 boolean contains(double x, double y)
          DOCUMENT ME!
 boolean contains(double x, double y, double w, double h)
          DOCUMENT ME!
 boolean contains(Point2D p)
          DOCUMENT ME!
 boolean contains(Rectangle2D r)
          DOCUMENT ME!
 Rectangle getBounds()
          DOCUMENT ME!
 Rectangle2D getBounds2D()
          DOCUMENT ME!
 Point2D getIntersection(Line2D line)
          Calculates the intersection point between this node shape and a line.
 PathIterator getPathIterator(AffineTransform at)
          DOCUMENT ME!
 PathIterator getPathIterator(AffineTransform at, double flatness)
          DOCUMENT ME!
 Rectangle2D getRealBounds2D()
          Returns a Rectangle2D that represents the encapsulated Rectangle2D, but has coordinates transformed relative to the view (instead of relative to the NodeComponent).
 boolean intersects(double x, double y, double w, double h)
          DOCUMENT ME!
 boolean intersects(Rectangle2D r)
          DOCUMENT ME!
 
Methods inherited from class org.graffiti.plugins.views.defaults.AbstractArrowShape
affix, getAnchor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.graffiti.plugin.view.NodeShape
buildShape
 

Constructor Detail

RectangularNodeShape

public RectangularNodeShape()
Method Detail

getBounds

public Rectangle getBounds()
DOCUMENT ME!

Specified by:
getBounds in interface Shape
Overrides:
getBounds in class AbstractArrowShape
Returns:
DOCUMENT ME!

getBounds2D

public Rectangle2D getBounds2D()
DOCUMENT ME!

Specified by:
getBounds2D in interface Shape
Overrides:
getBounds2D in class AbstractArrowShape
Returns:
DOCUMENT ME!

getIntersection

public Point2D getIntersection(Line2D line)
Calculates the intersection point between this node shape and a line.

Specified by:
getIntersection in interface NodeShape
Parameters:
line - the line with which the intersection should be calculated.
Returns:
the intersection point between this node shape and the line.
Throws:
RuntimeException - DOCUMENT ME!

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Description copied from class: AbstractArrowShape
DOCUMENT ME!

Specified by:
getPathIterator in interface Shape
Overrides:
getPathIterator in class AbstractArrowShape
Parameters:
at - DOCUMENT ME!
Returns:
DOCUMENT ME!
See Also:
Shape.getPathIterator(java.awt.geom.AffineTransform)

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Description copied from class: AbstractArrowShape
DOCUMENT ME!

Specified by:
getPathIterator in interface Shape
Overrides:
getPathIterator in class AbstractArrowShape
Parameters:
at - DOCUMENT ME!
flatness - DOCUMENT ME!
Returns:
DOCUMENT ME!
See Also:
Shape.getPathIterator(java.awt.geom.AffineTransform, double)

getRealBounds2D

public Rectangle2D getRealBounds2D()
Returns a Rectangle2D that represents the encapsulated Rectangle2D, but has coordinates transformed relative to the view (instead of relative to the NodeComponent).

Specified by:
getRealBounds2D in interface GraphElementShape
Returns:
a copy of the encapsulated rectangle but which has the real coordinates in the view.

contains

public boolean contains(Point2D p)
DOCUMENT ME!

Specified by:
contains in interface Shape
Overrides:
contains in class AbstractArrowShape
Parameters:
p - DOCUMENT ME!
Returns:
DOCUMENT ME!

contains

public boolean contains(Rectangle2D r)
DOCUMENT ME!

Specified by:
contains in interface Shape
Overrides:
contains in class AbstractArrowShape
Parameters:
r - DOCUMENT ME!
Returns:
DOCUMENT ME!

contains

public boolean contains(double x,
                        double y)
Description copied from class: AbstractArrowShape
DOCUMENT ME!

Specified by:
contains in interface Shape
Overrides:
contains in class AbstractArrowShape
Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
Returns:
DOCUMENT ME!
See Also:
Shape.contains(double, double)

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Description copied from class: AbstractArrowShape
DOCUMENT ME!

Specified by:
contains in interface Shape
Overrides:
contains in class AbstractArrowShape
Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
w - DOCUMENT ME!
h - DOCUMENT ME!
Returns:
DOCUMENT ME!
See Also:
Shape.contains(double, double, double, double)

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
DOCUMENT ME!

Specified by:
intersects in interface Shape
Overrides:
intersects in class AbstractArrowShape
Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
w - DOCUMENT ME!
h - DOCUMENT ME!
Returns:
DOCUMENT ME!

intersects

public boolean intersects(Rectangle2D r)
DOCUMENT ME!

Specified by:
intersects in interface Shape
Overrides:
intersects in class AbstractArrowShape
Parameters:
r - DOCUMENT ME!
Returns:
DOCUMENT ME!


Generated at 2012-05-30 11:01:25 PM CEST