Interface ConnectorRestrictions

All Known Implementing Classes:
GraphicalLine, Interaction, LineElement

public interface ConnectorRestrictions
Methods to provide restrictions for the connector path
Author:
unknown
  • Field Summary

    Fields
    Modifier and Type Field Description
    static int SIDE_EAST
    line is connected to a PathwayElement on it's EAST side.
    static int SIDE_NORTH
    line is connected to a PathwayElement on it's NORTH side.
    static int SIDE_SOUTH
    line is connected to a PathwayElement on it's SOUTH side.
    static int SIDE_WEST
    line is connected to a PathwayElement on it's WEST side.
  • Method Summary

    Modifier and Type Method Description
    java.awt.geom.Point2D getEndPoint2D()
    Returns the end point to which the connector must connect
    int getEndSide()
    Returns the side of the object to which the end of the connector connects
    java.awt.geom.Point2D getStartPoint2D()
    Returns the start point to which the connector must connect
    int getStartSide()
    Returns the side of the object to which the start of the connector connects
    ConnectorShape.WayPoint[] getWayPointPreferences()
    Returns the preferred waypoints, to which the connector must draw it's path.
    java.awt.Shape mayCross​(java.awt.geom.Point2D point)
    Checks if the connector may cross this point Optionally, returns a shape that defines the boundaries of the area around this point that the connector may not cross.
  • Field Details

    • SIDE_NORTH

      static final int SIDE_NORTH
      line is connected to a PathwayElement on it's NORTH side.
      See Also:
      Constant Field Values
    • SIDE_EAST

      static final int SIDE_EAST
      line is connected to a PathwayElement on it's EAST side.
      See Also:
      Constant Field Values
    • SIDE_SOUTH

      static final int SIDE_SOUTH
      line is connected to a PathwayElement on it's SOUTH side.
      See Also:
      Constant Field Values
    • SIDE_WEST

      static final int SIDE_WEST
      line is connected to a PathwayElement on it's WEST side.
      See Also:
      Constant Field Values
  • Method Details

    • mayCross

      java.awt.Shape mayCross​(java.awt.geom.Point2D point)
      Checks if the connector may cross this point Optionally, returns a shape that defines the boundaries of the area around this point that the connector may not cross. This method can be used for advanced connectors that route along other objects on the drawing
      Parameters:
      point - the point to check.
      Returns:
      A shape that defines the boundaries of the area around this point that the connector may not cross. Returning null is allowed for implementing classes.
    • getStartSide

      int getStartSide()
      Returns the side of the object to which the start of the connector connects
      Returns:
      The side, one of the SIDE_* constants
    • getEndSide

      int getEndSide()
      Returns the side of the object to which the end of the connector connects
      Returns:
      The side, one of the SIDE_* constants
    • getStartPoint2D

      java.awt.geom.Point2D getStartPoint2D()
      Returns the start point to which the connector must connect
      Returns:
      the start point.
    • getEndPoint2D

      java.awt.geom.Point2D getEndPoint2D()
      Returns the end point to which the connector must connect
      Returns:
      the end point.
    • getWayPointPreferences

      ConnectorShape.WayPoint[] getWayPointPreferences()
      Returns the preferred waypoints, to which the connector must draw it's path. The waypoints returned by this method are preferences and the connector shape may decide not to use them if they are invalid.