Interface IPolylineConstraint


public interface IPolylineConstraint
A constraint on Polyline editing.

This can for example be configured on a PolylineHandlesProvider.

  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Polyline polyline)
    Applies this constraint on a polyline without a (known) change.
    apply(Polyline oldPolyline, Polyline newPolyline, PolylineChange changes)
    Applies this constraint on a pending change.
  • Method Details

    • apply

      @NotNull Polyline apply(@NotNull Polyline oldPolyline, @NotNull Polyline newPolyline, @NotNull PolylineChange changes)
      Applies this constraint on a pending change.
      Parameters:
      oldPolyline - the base polyline on which the change is performed, cannot be null.
      newPolyline - the result of the change, without any constraints applied, cannot be null.
      changes - the change that was applied.
      Returns:
      the resulting polyline, after applying this constraint on the pending change. If the constraint does not apply, simply return the newPolyline. Cannot be null.
    • apply

      @NotNull Polyline apply(@NotNull Polyline polyline)
      Applies this constraint on a polyline without a (known) change.
      Parameters:
      polyline - the polyline to constrain, cannot be null.
      Returns:
      the resulting polyline, after applying this constraint. If the constraint does not apply, simply return the polyline. Cannot be null.