Class Editor
- All Implemented Interfaces:
AutoCloseable
Map
.
See the related guide for an overview of the editing API.
It manages the editing state and provides visualization capabilities by:
- tracking edit candidates (
IFeatureEditCandidateProvider
) - tracking which
Feature
is being edited, and which handles are used for it - creating
IFeatureModel
instances with handles, and keeping them up-to-date - providing a
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
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
finalize()
Returns the layer that paintIEditHandle
s.static Editor.Builder
Returns a new builder for creating anEditor
.onEvent
(IInputEvent inputEvent) Handles the given event, and returns if the event was handled or not.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
newBuilder
Returns a new builder for creating anEditor
.- Returns:
- a new builder for creating an
Editor
.
-
onEvent
Handles the given event, and returns if the event was handled or not.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
:- Active handles have priority over Highlighted handles, and Highlighted handles have priority over Inactive handles.
- If multiple handles have the same state, the order in which they are returned from
IEditHandles
is used
- Parameters:
inputEvent
- an event, cannot benull
.- Returns:
- if the event was consumed or not
- Throws:
NullPointerException
- whennull
is passed.
-
getEditHandleLayer
Returns the layer that paintIEditHandle
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 theMap
'slayer list
.- Returns:
- the layer that paint
IEditHandle
s.
-