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

    • CircularNodeShape

      public CircularNodeShape()
      The constructor creates an ellipse using default values.
  • Method Details

    • getIntersection

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

      public PathIterator getPathIterator​(AffineTransform t, double d)
      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)
      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 nodeAttr)
      This method sets all necessary properties using the values contained within the CollectionAttribute (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 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)
      DOCUMENT ME!
      Specified by:
      contains in interface Shape
      Overrides:
      contains in class RectangularNodeShape
      Parameters:
      a - DOCUMENT ME!
      b - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getIntersectionWithCircle

      public static Point2D getIntersectionWithCircle​(Ellipse2D circle, Line2D intLine)
      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

      public static Point2D[] getIntersectionsWithCircle​(Ellipse2D circle, Line2D intLine)