Class RectangleNodeShape
java.lang.Object
org.graffiti.plugins.views.defaults.AbstractArrowShape
org.graffiti.plugins.views.defaults.RectangularNodeShape
org.graffiti.plugins.views.defaults.RectangleNodeShape
- All Implemented Interfaces:
Shape,ArrowShape,GraffitiShape,GraphElementShape,NodeShape
- Direct Known Subclasses:
MultiRectangleShape,SBGNMultiStadiumShape,SBGNProcessShape,SBGNStadiumShape,TransitionShape
public class RectangleNodeShape extends RectangularNodeShape
Class representing a rectangle.
- Version:
- $Revision: 1.14 $
-
Constructor Summary
Constructors Constructor Description RectangleNodeShape()The constructor creates a rectangle using default values. -
Method Summary
Modifier and Type Method Description voidbuildShape(NodeGraphicAttribute graphics)This method sets all necessary properties using the values contained within theCollectionAttribute.booleancontains(double a, double b)DOCUMENT ME!booleancontains(double a, double b, double c, double d)DOCUMENT ME!Point2DgetIntersection(Line2D line)Calculates the intersection point between this node shape and a line.static Point2DgetIntersectionOfRoundRectangleAndLine(Line2D line, Rectangle2D rect, double rounding)PathIteratorgetPathIterator(AffineTransform t)DOCUMENT ME!PathIteratorgetPathIterator(AffineTransform t, double d)DOCUMENT ME!intshapeHeightCorrection()intshapeWidthCorrection()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, updateSize
-
Constructor Details
-
RectangleNodeShape
public RectangleNodeShape()The constructor creates a rectangle using default values.
-
-
Method Details
-
getIntersection
Description copied from interface:NodeShapeCalculates the intersection point between this node shape and a line. For irregularly shaped objects, the intersection that is nearest to the end point of the line is returned.- Parameters:
line- the line with which the intersection should be calculated.- Returns:
- the intersection point between this node shape and the line.
-
getIntersectionOfRoundRectangleAndLine
public static Point2D getIntersectionOfRoundRectangleAndLine(Line2D line, Rectangle2D rect, double rounding) -
getPathIterator
Description copied from class:AbstractArrowShapeDOCUMENT ME!- Specified by:
getPathIteratorin interfaceShape- Overrides:
getPathIteratorin classRectangularNodeShape- Parameters:
t- DOCUMENT ME!d- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getPathIterator
Description copied from class:AbstractArrowShapeDOCUMENT 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. This includes- Parameters:
graphics- The attribute that contains all necessary information to construct a rectangle.
-
contains
public boolean contains(double a, double b, double c, double d)Description copied from class:AbstractArrowShapeDOCUMENT 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)Description copied from class:AbstractArrowShapeDOCUMENT ME!- Specified by:
containsin interfaceShape- Overrides:
containsin classRectangularNodeShape- Parameters:
a- DOCUMENT ME!b- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
shapeHeightCorrection
public int shapeHeightCorrection() -
shapeWidthCorrection
public int shapeWidthCorrection()
-