Class MilitarySymbolFeatureHandlesProvider

java.lang.Object
com.luciad.symbology.military.MilitarySymbolFeatureHandlesProvider
All Implemented Interfaces:
IFeatureHandlesProvider, AutoCloseable

public final class MilitarySymbolFeatureHandlesProvider extends Object implements AutoCloseable, IFeatureHandlesProvider
Provides editing handles for military symbol features.

Example usage

  public static class MyEditConfiguration implements IFeatureEditConfiguration {
    @Override
    public void edit(Feature feature, long layerId, Map map, FeatureEditConfigurationBuilder builder) {
      builder.handlesProvider(new MilitarySymbolFeatureHandlesProvider());
      builder.submit();
    }
  }

  public static void enableCustomEditing(IFeatureModel militarySymbologyModel) {
    // Create a layer from a military symbols model and make it editable using a custom configuration
    FeatureLayer layer = FeatureLayer.newBuilder() //
                                     .model(militarySymbologyModel)
                                     .editable(true)
                                     .editConfiguration(new MyEditConfiguration())
                                     .build();
  }
See Also:
  • Constructor Details

    • MilitarySymbolFeatureHandlesProvider

      public MilitarySymbolFeatureHandlesProvider()
      Default constructor.
  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • canProvide

      public boolean canProvide(@NotNull Observable<@NotNull Feature> feature, @NotNull FeatureEditContext context)
      Indicates if this handles provider can create handles for the given Feature.
      Specified by:
      canProvide in interface IFeatureHandlesProvider
      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 public 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.

      Specified by:
      provide in interface IFeatureHandlesProvider
      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.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class Object