Interface PointHandlesProvider.IHandleFactory
- Enclosing class:
PointHandlesProvider
It allows you to
- replace handles with other handle implementations
- (dynamically) disable or re-enable specific handles
Additional handles can not be added using this factory. The way to do this is to wrap the IEditHandles
provided by PointHandlesProvider
, and to insert additional handles in the IEditHandles#getList
method.
-
Method Summary
Modifier and TypeMethodDescriptioncreateElevationPointHandle
(Observable<@Nullable Point> point, IPointEditAction editAction, FeatureEditContext context) Creates a handle that allows you to move thePoint
vertically.boolean
isElevationPointHandleValid
(IEditHandle elevationHandle, Observable<@Nullable Point> point, FeatureEditContext context) Returns true if the given handle is still valid, or false if it should be removed.
-
Method Details
-
createElevationPointHandle
@Nullable IEditHandle createElevationPointHandle(@NotNull Observable<@Nullable Point> point, @NotNull IPointEditAction editAction, @NotNull FeatureEditContext context) Creates a handle that allows you to move thePoint
vertically.This method is only called when a 3D
Map
is used. While the handle is not already present, this method is called whenever the edited geometry changes.- Parameters:
point
- the geometry that is being editededitAction
- the move-point edit action, to be used by the handle. If aconstraint
was configured on the handles provider, this action applies that constraint when it is executed, providing aPointChange
parameter with thetranslation
.context
- the context- Returns:
- a new handle, or
null
if no handle should be used
-
isElevationPointHandleValid
boolean isElevationPointHandleValid(@NotNull IEditHandle elevationHandle, @NotNull Observable<@Nullable Point> point, @NotNull FeatureEditContext context) Returns true if the given handle is still valid, or false if it should be removed.This method is called whenever the edited geometry changes and allows the factory to dynamically disable or re-create specific edit handles. When this method returns false, the handle is removed and
createElevationPointHandle
is called, in case the handle should immediately be re-created. If the handle should remain absent, make sure to also returnnull
in that method.- Parameters:
elevationHandle
- the handlepoint
- theGeometry
that is being editedcontext
- the context- Returns:
- true if the given handle is still valid, or false if it should be removed.
-