Class 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 Details

    • RectangleNodeShape

      public RectangleNodeShape()
      The constructor creates a rectangle using default values.
  • Method Details

    • getIntersection

      public Point2D getIntersection​(Line2D line)
      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

      public PathIterator getPathIterator​(AffineTransform t, double d)
      Description copied from class: AbstractArrowShape
      DOCUMENT ME!
      Specified by:
      getPathIterator in interface Shape
      Overrides:
      getPathIterator in class RectangularNodeShape
      Parameters:
      t - DOCUMENT ME!
      d - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getPathIterator

      public PathIterator getPathIterator​(AffineTransform t)
      Description copied from class: AbstractArrowShape
      DOCUMENT ME!
      Specified by:
      getPathIterator in interface Shape
      Overrides:
      getPathIterator in class RectangularNodeShape
      Parameters:
      t - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • buildShape

      public void buildShape​(NodeGraphicAttribute graphics)
      This method sets all necessary properties using the values contained within the CollectionAttribute. 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 interface Shape
      Overrides:
      contains in class RectangularNodeShape
      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 interface Shape
      Overrides:
      contains in class RectangularNodeShape
      Parameters:
      a - DOCUMENT ME!
      b - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • shapeHeightCorrection

      public int shapeHeightCorrection()
    • shapeWidthCorrection

      public int shapeWidthCorrection()