Record Class LinkGeometry

java.lang.Object
java.lang.Record
lu.kbra.modelizer_next.ui.canvas.datastruct.LinkGeometry
Record Components:
fromPoint - point in canvas coordinates
toPoint - point in canvas coordinates
fromSide - from side value used by the operation
toSide - to side value used by the operation
labelPoint - point in canvas coordinates
middlePoint - point in canvas coordinates
labelAngle - numeric label angle value
points - points in canvas coordinates

public record LinkGeometry(Point2D fromPoint, Point2D toPoint, AnchorSide fromSide, AnchorSide toSide, Point2D labelPoint, Point2D middlePoint, double labelAngle, List<Point2D> points) extends Record
Resolved geometry for drawing a link path and its labels.
  • Constructor Details

    • LinkGeometry

      public LinkGeometry(Point2D fromPoint, Point2D toPoint, AnchorSide fromSide, AnchorSide toSide, Point2D labelPoint, Point2D middlePoint, double labelAngle, List<Point2D> points)
      Creates an instance of a LinkGeometry record class.
      Parameters:
      fromPoint - the value for the fromPoint record component
      toPoint - the value for the toPoint record component
      fromSide - the value for the fromSide record component
      toSide - the value for the toSide record component
      labelPoint - the value for the labelPoint record component
      middlePoint - the value for the middlePoint record component
      labelAngle - the value for the labelAngle record component
      points - the value for the points record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • fromPoint

      public Point2D fromPoint()
      Returns the value of the fromPoint record component.
      Returns:
      the value of the fromPoint record component
    • toPoint

      public Point2D toPoint()
      Returns the value of the toPoint record component.
      Returns:
      the value of the toPoint record component
    • fromSide

      public AnchorSide fromSide()
      Returns the value of the fromSide record component.
      Returns:
      the value of the fromSide record component
    • toSide

      public AnchorSide toSide()
      Returns the value of the toSide record component.
      Returns:
      the value of the toSide record component
    • labelPoint

      public Point2D labelPoint()
      Returns the value of the labelPoint record component.
      Returns:
      the value of the labelPoint record component
    • middlePoint

      public Point2D middlePoint()
      Returns the value of the middlePoint record component.
      Returns:
      the value of the middlePoint record component
    • labelAngle

      public double labelAngle()
      Returns the value of the labelAngle record component.
      Returns:
      the value of the labelAngle record component
    • points

      public List<Point2D> points()
      Returns the value of the points record component.
      Returns:
      the value of the points record component