Class CircularNodeShape
java.lang.Object
org.graffiti.plugins.views.defaults.AbstractArrowShape
org.graffiti.plugins.views.defaults.RectangularNodeShape
org.graffiti.plugins.views.defaults.CircularNodeShape
- All Implemented Interfaces:
Shape
,ArrowShape
,GraffitiShape
,GraphElementShape
,NodeShape
- Direct Known Subclasses:
CircleNodeShape
,EllipseNodeShape
public abstract class CircularNodeShape extends RectangularNodeShape
Concrete class representing an ellipse.
-
Constructor Summary
Constructors Constructor Description CircularNodeShape()
The constructor creates an ellipse using default values. -
Method Summary
Modifier and Type Method Description void
buildShape(NodeGraphicAttribute nodeAttr)
This method sets all necessary properties using the values contained within theCollectionAttribute
(like size etc.).boolean
contains(double a, double b)
DOCUMENT ME!boolean
contains(double a, double b, double c, double d)
DOCUMENT ME!abstract Point2D
getIntersection(Line2D line)
Calculates the intersection between this shape and a line.static Point2D[]
getIntersectionsWithCircle(Ellipse2D circle, Line2D intLine)
static Point2D
getIntersectionWithCircle(Ellipse2D circle, Line2D intLine)
Calculates the intersection between a circle and a line.PathIterator
getPathIterator(AffineTransform t)
DOCUMENT ME!PathIterator
getPathIterator(AffineTransform t, double d)
DOCUMENT ME!Methods inherited from class org.graffiti.plugins.views.defaults.RectangularNodeShape
contains, contains, getBounds, getBounds2D, getRealBounds2D, getXexcess, getYexcess, intersects, intersects, setCoordinateSystem
Methods inherited from class org.graffiti.plugins.views.defaults.AbstractArrowShape
addThickness, affix, getAnchor, updateSize
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
shapeHeightCorrection, shapeWidthCorrection
-
Constructor Details
-
CircularNodeShape
public CircularNodeShape()The constructor creates an ellipse using default values.
-
-
Method Details
-
getIntersection
Calculates the intersection between this shape and a line.- Parameters:
line
-- Returns:
- the intersection point or null if shape and line do not intersect.
-
getPathIterator
DOCUMENT ME!- Specified by:
getPathIterator
in interfaceShape
- Overrides:
getPathIterator
in classRectangularNodeShape
- Parameters:
t
- DOCUMENT ME!d
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getPathIterator
DOCUMENT ME!- Specified by:
getPathIterator
in interfaceShape
- Overrides:
getPathIterator
in classRectangularNodeShape
- Parameters:
t
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
buildShape
This method sets all necessary properties using the values contained within theCollectionAttribute
(like size etc.).- Parameters:
nodeAttr
- The attribute that contains all necessary information to construct an ellipse.
-
contains
public boolean contains(double a, double b, double c, double d)DOCUMENT ME!- Specified by:
contains
in interfaceShape
- Overrides:
contains
in classRectangularNodeShape
- Parameters:
a
- DOCUMENT ME!b
- DOCUMENT ME!c
- DOCUMENT ME!d
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
contains
public boolean contains(double a, double b)DOCUMENT ME!- Specified by:
contains
in interfaceShape
- Overrides:
contains
in classRectangularNodeShape
- Parameters:
a
- DOCUMENT ME!b
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getIntersectionWithCircle
Calculates the intersection between a circle and a line.- Parameters:
circle
-intLine
-- Returns:
- the intersection point or null if shape and line do not intersect.
- Throws:
IllegalArgumentException
- DOCUMENT ME!
-
getIntersectionsWithCircle
-