Package com.luciad.edit.features
Class FeatureHandlesProvider
java.lang.Object
com.luciad.edit.features.FeatureHandlesProvider
- All Implemented Interfaces:
IFeatureHandlesProvider,AutoCloseable
public final class FeatureHandlesProvider
extends Object
implements AutoCloseable, IFeatureHandlesProvider
Default handles provider for features.
It can create a handles for features by:
creatinga handle to translate the entire featuredelegatingto a geometry handles provider.
The delegate geometry handles are created using an IGeometryHandlesProvider. The geometry is extracted from the feature using the IFeatureGeometryProvider that is provided by the feature layer. This IFeatureGeometryProvider can be configured in the feature layer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAllows you to specify the translate handle that is used by this handles provider. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanProvide(Observable<@NotNull Feature> feature, FeatureEditContext context) Indicates if this handles provider can create handles for the givenFeature.voidclose()booleanprotected voidfinalize()Returns theIGeometryHandlesProviderthat is used.Returns the handle factory used by the handles provider.inthashCode()provide(Observable<@NotNull Feature> feature, FeatureEditContext context, IFeatureEditCallback featureEditCallback) Returns handles for the given feature.voidsetGeometryHandlesProvider(IGeometryHandlesProvider handlesProvider) Sets theIGeometryHandlesProviderthat is used.voidsetHandleFactory(FeatureHandlesProvider.IHandleFactory handleFactory) Sets the handle factory used by the handles provider.
-
Constructor Details
-
FeatureHandlesProvider
public FeatureHandlesProvider()Creates a new instance.
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein 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:
canProvidein 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:
providein 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 theFeaturehas changed.- Returns:
- handles for the given feature. If this provider doesn't support the given feature, it can return
null.
-
getHandleFactory
Returns the handle factory used by the handles provider.- Returns:
- the handle factory used by the handles provider.
-
setHandleFactory
Sets the handle factory used by the handles provider.If this method is not called, a default handle factory is used. You can change the behavior of this default handle factory by:
- wrapping it with your own
IHandleFactoryimplementation, by delegating to the default factory - omitting/replacing the handle that is returned
- Parameters:
handleFactory- a handle factory
- wrapping it with your own
-
getGeometryHandlesProvider
Returns theIGeometryHandlesProviderthat is used.- Returns:
- the
IGeometryHandlesProviderthat is used. - See Also:
-
setGeometryHandlesProvider
Sets theIGeometryHandlesProviderthat is used.If this method is not called, or if
nullis passed, adefaultimplementation is used.- Parameters:
handlesProvider- theIGeometryHandlesProviderto use. Can benull.
-
hashCode
public int hashCode() -
equals
-