public static interface PolylineHandlesProvider.IHandleFactory
It allows you to:
Additional handles can not be added using this factory. The way to do this is to wrap the IEditHandles
provided by PolylineHandlesProvider
, and to insert additional handles in the IEditHandles#getList
method.
Modifier and Type | Method and Description |
---|---|
IEditHandle |
createAppendPointHandle(Observable<Polyline> polyline,
IPointEditAction editAction,
FeatureEditContext context)
Creates a handle that allows you to insert a new point at the end of a
Polyline . |
IEditHandle |
createElevationPointHandle(Observable<Polyline> polyline,
long pointIndex,
IPointEditAction editAction,
FeatureEditContext context)
Creates a handle that allows you to change the elevation of the point of a
Polyline . |
IEditHandle |
createInsertPointHandle(Observable<Polyline> polyline,
long insertIndex,
IPointEditAction editAction,
FeatureEditContext context)
Creates a handle that allows you to insert a new point between two existing points of a
Polyline . |
IEditHandle |
createMovePointHandle(Observable<Polyline> polyline,
long pointIndex,
IPointEditAction editAction,
FeatureEditContext context)
Creates a handle that allows you to move a point of the
Polyline . |
IEditHandle |
createPrependPointHandle(Observable<Polyline> polyline,
IPointEditAction editAction,
FeatureEditContext context)
Creates a handle that allows you to insert a new point at the start of a
Polyline . |
IEditHandle |
createRemovePointHandle(Observable<Polyline> polyline,
long pointIndex,
IPointEditAction editAction,
FeatureEditContext context)
Creates a handle that allows you to remove a point of the
Polyline . |
boolean |
isAppendPointHandleValid(IEditHandle appendPointHandle,
Observable<Polyline> polyline,
FeatureEditContext context)
Returns true if the given handle is still valid, or false if it should be removed.
|
boolean |
isElevationPointHandleValid(IEditHandle elevationPointHandle,
Observable<Polyline> polyline,
long pointIndex,
FeatureEditContext context)
Returns true if the given handle is still valid, or false if it should be removed.
|
boolean |
isInsertPointHandleValid(IEditHandle insertPointHandle,
Observable<Polyline> polyline,
long insertIndex,
FeatureEditContext context)
Returns true if the given handle is still valid, or false if it should be removed.
|
boolean |
isMovePointHandleValid(IEditHandle movePointHandle,
Observable<Polyline> polyline,
long pointIndex,
FeatureEditContext context)
Returns true if the given handle is still valid, or false if it should be removed.
|
boolean |
isPrependPointHandleValid(IEditHandle prependPointHandle,
Observable<Polyline> polyline,
FeatureEditContext context)
Returns true if the given handle is still valid, or false if it should be removed.
|
boolean |
isRemovePointHandleValid(IEditHandle removePointHandle,
Observable<Polyline> polyline,
long pointIndex,
FeatureEditContext context)
Returns true if the given handle is still valid, or false if it should be removed.
|
@Nullable IEditHandle createMovePointHandle(@NotNull Observable<Polyline> polyline, long pointIndex, @NotNull IPointEditAction editAction, @NotNull FeatureEditContext context)
Polyline
.
While the handle is not already present, this method is called whenever the edited geometry changes.
polyline
- the Geometry
that is being editedpointIndex
- the index of the point to moveeditAction
- the move-point edit action, to be used by the handle. If a constraint
was configured on the handles provider, this action applies that constraint when it is executed, providing a PolylineChange
parameter with one moved point index
.context
- the contextnull
if no handle should be usedboolean isMovePointHandleValid(@NotNull IEditHandle movePointHandle, @NotNull Observable<Polyline> polyline, long pointIndex, @NotNull FeatureEditContext context)
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 createMovePointHandle
is called, in case the handle should immediately be re-created. If the handle should remain absent, make sure to also return null
in that method.
movePointHandle
- the handlepolyline
- the Geometry
that is being editedpointIndex
- the index of the pointcontext
- the context@Nullable IEditHandle createRemovePointHandle(@NotNull Observable<Polyline> polyline, long pointIndex, @NotNull IPointEditAction editAction, @NotNull FeatureEditContext context)
Polyline
.
While the handle is not already present, this method is called whenever the edited geometry changes.
polyline
- the Geometry
that is being editedpointIndex
- the index of the point to removeeditAction
- the remove-point edit action, to be used by the handle. If a constraint
was configured on the handles provider, this action applies that constraint when it is executed, providing a PolylineChange
parameter with one removed point index
.context
- the contextnull
if no handle should be usedboolean isRemovePointHandleValid(@NotNull IEditHandle removePointHandle, @NotNull Observable<Polyline> polyline, long pointIndex, @NotNull FeatureEditContext context)
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 createRemovePointHandle
is called, in case the handle should immediately be re-created. If the handle should remain absent, make sure to also return null
in that method.
removePointHandle
- the handlepolyline
- the Geometry
that is being editedpointIndex
- the index of the pointcontext
- the context@Nullable IEditHandle createElevationPointHandle(@NotNull Observable<Polyline> polyline, long pointIndex, @NotNull IPointEditAction editAction, @NotNull FeatureEditContext context)
Polyline
.
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.
polyline
- the Geometry
that is being editedpointIndex
- the index of the point to move/removeeditAction
- the move-point edit action, to be used by the handle. If a constraint
was configured on the handles provider, this action applies that constraint when it is executed, providing a PolylineChange
parameter with one moved point index
.context
- the contextnull
if no handle should be usedboolean isElevationPointHandleValid(@NotNull IEditHandle elevationPointHandle, @NotNull Observable<Polyline> polyline, long pointIndex, @NotNull FeatureEditContext context)
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 return null
in that method.
elevationPointHandle
- the handlepolyline
- the Geometry
that is being editedpointIndex
- the index of the pointcontext
- the context@Nullable IEditHandle createInsertPointHandle(@NotNull Observable<Polyline> polyline, long insertIndex, @NotNull IPointEditAction editAction, @NotNull FeatureEditContext context)
Polyline
.
While the handle is not already present, this method is called whenever the edited geometry changes.
polyline
- the Geometry
that is being editedinsertIndex
- the index at which to insert a point in the Polyline
. After the point is inserted, the new point will have this index. Values lie within [1, pointCount - 1]
editAction
- the edit action that inserts the point. If a constraint
was configured on the handles provider, this action applies that constraint when it is executed, providing a PolylineChange
parameter with one inserted point index
.context
- the contextnull
if no handle should be usedboolean isInsertPointHandleValid(@NotNull IEditHandle insertPointHandle, @NotNull Observable<Polyline> polyline, long insertIndex, @NotNull FeatureEditContext context)
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 createInsertPointHandle
is called, in case the handle should immediately be re-created. If the handle should remain absent, make sure to also return null
in that method.
insertPointHandle
- the handlepolyline
- the Geometry
that is being editedinsertIndex
- the insertion indexcontext
- the context@Nullable IEditHandle createPrependPointHandle(@NotNull Observable<Polyline> polyline, @NotNull IPointEditAction editAction, @NotNull FeatureEditContext context)
Polyline
.
While the handle is not already present, this method is called whenever the edited geometry changes.
polyline
- the Geometry
that is being editededitAction
- the edit action that inserts the point at the start of the polyline. If a constraint
was configured on the handles provider, this action applies that constraint when it is executed, providing a PolylineChange
parameter with one inserted point index
equal to 0
.context
- the contextnull
if no handle should be usedboolean isPrependPointHandleValid(@NotNull IEditHandle prependPointHandle, @NotNull Observable<Polyline> polyline, @NotNull FeatureEditContext context)
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 createPrependPointHandle
is called, in case the handle should immediately be re-created. If the handle should remain absent, make sure to also return null
in that method.
prependPointHandle
- the handlepolyline
- the Geometry
that is being editedcontext
- the context@Nullable IEditHandle createAppendPointHandle(@NotNull Observable<Polyline> polyline, @NotNull IPointEditAction editAction, @NotNull FeatureEditContext context)
Polyline
.
While the handle is not already present, this method is called whenever the edited geometry changes.
polyline
- the Geometry
that is being editededitAction
- the edit action that inserts the point at the end of the polyline. If a constraint
was configured on the handles provider, this action applies that constraint when it is executed, providing a PolylineChange
parameter with one inserted point index
equal to pointCount
(of the new polyline).context
- the contextnull
if no handle should be usedboolean isAppendPointHandleValid(@NotNull IEditHandle appendPointHandle, @NotNull Observable<Polyline> polyline, @NotNull FeatureEditContext context)
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 createAppendPointHandle
is called, in case the handle should immediately be re-created. If the handle should remain absent, make sure to also return null
in that method.
appendPointHandle
- the handlepolyline
- the Geometry
that is being editedcontext
- the context