org.graffiti.plugins.views.defaults
Class AbstractArrowShape

java.lang.Object
  extended by org.graffiti.plugins.views.defaults.AbstractArrowShape
All Implemented Interfaces:
Shape, ArrowShape
Direct Known Subclasses:
RectangularNodeShape, StandardArrowShape

public abstract class AbstractArrowShape
extends Object
implements ArrowShape

DOCUMENT ME!

Version:
$Revision: 5766 $ $Date: 2006-01-04 10:21:57 +0100 (Mi, 04 Jan 2006) $
Author:
$Author: gleissner $

Constructor Summary
AbstractArrowShape()
           
 
Method Summary
 Shape affix(Point2D target, Point2D other, double lineWidth)
          Sets this arrow to the target point and rotates it according to the line given by the conenction between points target and other.
 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!
 Point2D getAnchor()
          Returns the anchor of the arrow, i.e.
 Rectangle getBounds()
          DOCUMENT ME!
 Rectangle2D getBounds2D()
          DOCUMENT ME!
 PathIterator getPathIterator(AffineTransform t)
          DOCUMENT ME!
 PathIterator getPathIterator(AffineTransform t, double d)
          DOCUMENT ME!
 boolean intersects(double x, double y, double w, double h)
          DOCUMENT ME!
 boolean intersects(Rectangle2D r)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractArrowShape

public AbstractArrowShape()
Method Detail

getAnchor

public Point2D getAnchor()
Returns the anchor of the arrow, i.e. the point where the line should be attached to the arrow. This is only valid after a call to affix.

Specified by:
getAnchor in interface ArrowShape
Returns:
the anchor of the arrow.

getBounds

public Rectangle getBounds()
DOCUMENT ME!

Specified by:
getBounds in interface Shape
Returns:
DOCUMENT ME!

getBounds2D

public Rectangle2D getBounds2D()
DOCUMENT ME!

Specified by:
getBounds2D in interface Shape
Returns:
DOCUMENT ME!

getPathIterator

public PathIterator getPathIterator(AffineTransform t,
                                    double d)
DOCUMENT ME!

Specified by:
getPathIterator in interface Shape
Parameters:
t - DOCUMENT ME!
d - DOCUMENT ME!
Returns:
DOCUMENT ME!

getPathIterator

public PathIterator getPathIterator(AffineTransform t)
DOCUMENT ME!

Specified by:
getPathIterator in interface Shape
Parameters:
t - DOCUMENT ME!
Returns:
DOCUMENT ME!

affix

public Shape affix(Point2D target,
                   Point2D other,
                   double lineWidth)
Sets this arrow to the target point and rotates it according to the line given by the conenction between points target and other. Ensures that the arrow is always larger than the line.

Specified by:
affix in interface ArrowShape
Parameters:
target - the point where the arrow should be put.
other - needed to calculate the direction in which the arrow should point to. The line is given by the two points target and other.
lineWidth - The total width of the line. May be used to scale the arrow so as to be larger than the line.
Returns:
the point where the line meets the arrow

contains

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

Specified by:
contains in interface Shape
Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
w - DOCUMENT ME!
h - DOCUMENT ME!
Returns:
DOCUMENT ME!

contains

public boolean contains(double x,
                        double y)
DOCUMENT ME!

Specified by:
contains in interface Shape
Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
Returns:
DOCUMENT ME!

contains

public boolean contains(Point2D p)
DOCUMENT ME!

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

contains

public boolean contains(Rectangle2D r)
DOCUMENT ME!

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

intersects

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

Specified by:
intersects in interface Shape
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
Parameters:
r - DOCUMENT ME!
Returns:
DOCUMENT ME!


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