Class LocatorConnector

java.lang.Object
org.jhotdraw8.draw.connector.AbstractConnector
org.jhotdraw8.draw.connector.LocatorConnector
All Implemented Interfaces:
Connector
Direct Known Subclasses:
EllipseConnector, PathConnector, RectangleConnector

public class LocatorConnector extends AbstractConnector
LocatorConnector uses a Locator to compute its position.
Author:
Werner Randelshofer
  • Constructor Details

    • LocatorConnector

      public LocatorConnector(Locator locator)
      Creates a new instance
      Parameters:
      locator - the locator that should be used
  • Method Details

    • getLocator

      public Locator getLocator()
      Returns the locator used to compute the position of the connector.
      Returns:
      the locator
    • getPointAndDerivativeInLocal

      public @NonNull PointAndDerivative getPointAndDerivativeInLocal(@NonNull Figure connection, @NonNull Figure target)
      Description copied from interface: Connector
      Returns a point and derivative on the target figure for the specified connection figure in local coordinates.
      Parameters:
      connection - a connection figure
      target - the target
      Returns:
      A point and derivative on the target figure in local coordinates of the target figure.