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 void
buildShape(NodeGraphicAttribute graphics)
This method sets all necessary properties using the values contained within theCollectionAttribute
.boolean
contains(double a, double b)
DOCUMENT ME!boolean
contains(double a, double b, double c, double d)
DOCUMENT ME!Point2D
getIntersection(Line2D line)
Calculates the intersection point between this node shape and a line.static Point2D
getIntersectionOfRoundRectangleAndLine(Line2D line, Rectangle2D rect, double rounding)
PathIterator
getPathIterator(AffineTransform t)
DOCUMENT ME!PathIterator
getPathIterator(AffineTransform t, double d)
DOCUMENT ME!int
shapeHeightCorrection()
int
shapeWidthCorrection()
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
-
Constructor Details
-
RectangleNodeShape
public RectangleNodeShape()The constructor creates a rectangle using default values.
-
-
Method Details
-
getIntersection
Description copied from interface:NodeShape
Calculates 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:AbstractArrowShape
DOCUMENT ME!- Specified by:
getPathIterator
in interfaceShape
- Overrides:
getPathIterator
in classRectangularNodeShape
- Parameters:
t
- DOCUMENT ME!d
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getPathIterator
Description copied from class:AbstractArrowShape
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
. 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:AbstractArrowShape
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)Description copied from class:AbstractArrowShape
DOCUMENT ME!- Specified by:
contains
in interfaceShape
- Overrides:
contains
in classRectangularNodeShape
- Parameters:
a
- DOCUMENT ME!b
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
shapeHeightCorrection
public int shapeHeightCorrection() -
shapeWidthCorrection
public int shapeWidthCorrection()
-