public final class Editor extends Object implements AutoCloseable
Map
.
See the related guide for an overview of the editing API.
It manages the editing state and provides visualization capabilities by:
IFeatureEditCandidateProvider
)
Feature
is being edited, and which handles are used for it
IFeatureModel
instances with handles, and keeping them up-to-date
LayerList
that can be used to visualize the handle models
Editing can be configured using:
Editor.Builder
FeatureLayer.Builder#editConfiguration
FeatureLayer.Builder#editCreateGeometryProvider
It is allowed to access this class on the UI thread only. See the related article: Threading rules for the Map
Modifier and Type | Class and Description |
---|---|
static class |
Editor.Builder
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
finalize() |
FeatureLayer |
getEditHandleLayer() |
static Editor.Builder |
newBuilder()
Returns a new builder for creating an
Editor . |
EventResult |
onEvent(IInputEvent inputEvent)
Handles the given event, and returns if the event was handled or not.
|
public void close()
close
in interface AutoCloseable
@NotNull public static Editor.Builder newBuilder()
Editor
.Editor
.@NotNull public EventResult onEvent(@NotNull IInputEvent inputEvent) throws NullPointerException
This method delegates the given event to one of the currently available handles. The order in which this event is passed to the handles is determined by the handle's state, and the order in which they are returned from IEditHandles
:
IEditHandles
is used
inputEvent
- an event, cannot be null
.NullPointerException
- when null
is passed.@NotNull public FeatureLayer getEditHandleLayer()
IEditHandle
s. This layer can contain the edit handles of multiple feature layers. The returned layer instance will always be the same, but the layer's model gets updated as edit handles are added, removed or modified. A controller implementation typically adds this layer to its layer list
, although it can also add this layer to the Map
's layer list
.