Interface IPointConstraint


public interface IPointConstraint
A constraint on Point editing.

This can for example be configured on a PointHandlesProvider.

  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Point point)
    Applies this constraint on a point without a (known) change.
    apply(Point oldPoint, Point newPoint, PointChange change)
    Applies this constraint on a pending change.
  • Method Details

    • apply

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

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