Package com.luciad.symbology.military
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canProvide
(Observable<@NotNull Feature> feature, FeatureEditContext context) Indicates if this handles provider can create handles for the givenFeature
.void
close()
protected void
finalize()
provide
(Observable<@NotNull Feature> feature, FeatureEditContext context, IFeatureEditCallback featureEditCallback) Returns handles for the given feature.
-
Constructor Details
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
canProvide
public boolean canProvide(@NotNull Observable<@NotNull Feature> feature, @NotNull FeatureEditContext context) Indicates if this handles provider can create handles for the givenFeature
.- Specified by:
canProvide
in interfaceIFeatureHandlesProvider
- Parameters:
feature
- an observableFeature
.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 interfaceIFeatureHandlesProvider
- 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 theFeature
has changed.- Returns:
- handles for the given feature. If this provider doesn't support the given feature, it can return
null
.
-