Interface EdgeRouter.AdjustInfo

Enclosing interface:
EdgeRouter

public static interface EdgeRouter.AdjustInfo
The adjust info is a helper class to facilitate parameter passing to EdgeRouter.adjust(Collection) adjust(Collection)} and EdgeRouter.adjust(Collection, Set) adjust(Collection, Set)}. It consists of an (immutable) list of current points and two shapes. Together these three objects form a conceptual edge. The adjust methods should make a best effort to adjust, or align, these edges and put the resulting point lists in the corresponding AdjustInfo (edge) by calling its setNewPoints. If the new points have not been set when adjust(Map) or adjust(Map, Set) are done, the current points will be used. Otherwise, the newly set points will be used. Note that the points returned from getCurrentPoints must not be changed. The behaviour of such an action is undefined (and might throw exceptions).
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the current (immutable) list of points of this conceptual edge.
    Returns the shape that this conceptual edge goes from.
    Returns the shape that this conceptual edge goes to.
    void
    Sets the adjusted points on this conceptual edge.
  • Method Details

    • getFrom

      Shape getFrom()
      Returns the shape that this conceptual edge goes from.
      Returns:
      the shape that this conceptual edge goes from.
    • getTo

      Shape getTo()
      Returns the shape that this conceptual edge goes to.
      Returns:
      the shape that this conceptual edge goes to.
    • setNewPoints

      void setNewPoints(List<Point> points)
      Sets the adjusted points on this conceptual edge. This method may be called multiple times while an adjust is under operation. Implementations may not change or alter the sent in list or it's points. If that is needed by the implementation, it must make a copy of the points an put it in an internal structure. That is, the list (and it's elements) should behave as fully immutable.
      Parameters:
      points - A list of points adjusted to other AdjustInfo-points in a best effort manner.
    • getCurrentPoints

      List<Point> getCurrentPoints()
      Returns the current (immutable) list of points of this conceptual edge. This is the control points of the edge going from the shape getFrom(), to the shape getTo().

      NOTE: The points in the returned list should be considered immutable. The effects of changing the point values is undefined and may throw exceptions. Changing the list itself will throw an exception.
      Returns:
      the current list of points of this conceptual edge