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 voidbuildShape(NodeGraphicAttribute nodeAttr)This method sets all necessary properties using the values contained within theCollectionAttribute(like size etc.).booleancontains(double a, double b)DOCUMENT ME!booleancontains(double a, double b, double c, double d)DOCUMENT ME!abstract Point2DgetIntersection(Line2D line)Calculates the intersection between this shape and a line.static Point2D[]getIntersectionsWithCircle(Ellipse2D circle, Line2D intLine)static Point2DgetIntersectionWithCircle(Ellipse2D circle, Line2D intLine)Calculates the intersection between a circle and a line.PathIteratorgetPathIterator(AffineTransform t)DOCUMENT ME!PathIteratorgetPathIterator(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, setCoordinateSystemMethods inherited from class org.graffiti.plugins.views.defaults.AbstractArrowShape
addThickness, affix, getAnchor, updateSizeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getPathIteratorin interfaceShape- Overrides:
getPathIteratorin classRectangularNodeShape- Parameters:
t- DOCUMENT ME!d- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getPathIterator
DOCUMENT ME!- Specified by:
getPathIteratorin interfaceShape- Overrides:
getPathIteratorin 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:
containsin interfaceShape- Overrides:
containsin 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:
containsin interfaceShape- Overrides:
containsin 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
-