Interface IFeatureHandlesProvider

All Known Implementing Classes:
CompositeFeatureHandlesProvider, FeatureHandlesProvider, MilitarySymbolFeatureHandlesProvider

public interface IFeatureHandlesProvider
This class can provide edit handles for a given Feature.

The given Feature is passed to this provider as an Observable. This object allows Editor to communicate feature changes to the IEditHandles implementations, who can use it to create and update their collection of handles. Editing changes originating from IEditHandles are communicated to the Editor using IFeatureEditCallback. See also the related guide on editing interactions.

See the related guide for an overview of the editing API.

In many cases, the FeatureHandlesProvider implementation is sufficient.

  • Method Details

    • canProvide

      boolean canProvide(@NotNull Observable<@NotNull Feature> feature, @NotNull FeatureEditContext context)
      Indicates if this handles provider can create handles for the given Feature.
      Parameters:
      feature - an observable Feature.
      context - the context. Contains additional information about the edited feature.
      Returns:
      if this handles provider can create handles for the given Feature.
    • provide

      @Nullable IEditHandles provide(@NotNull Observable<@NotNull Feature> feature, @NotNull FeatureEditContext context, @NotNull IFeatureEditCallback featureEditCallback)
      Returns handles for the given feature.

      If this provider doesn't support the given feature, it can return null.

      Parameters:
      feature - the observable feature for which to create handles.
      context - the context. Contains additional information about the edited feature.
      featureEditCallback - a callback that notifies the caller when the Feature has changed.
      Returns:
      handles for the given feature. If this provider doesn't support the given feature, it can return null.