public final class FeatureEditContext extends Object implements AutoCloseable
FeatureEditContext
provides context information for the feature that is being edited.Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
finalize() |
EditSettings |
getDefaultSettings() |
Observable<Feature> |
getFeature() |
LayerFeatureId |
getHandleFeatureId() |
long |
getHandleLayerId() |
FeatureLayer |
getLayer() |
Map |
getMap() |
IFeatureModel |
getModel() |
LayerFeatureId |
getPreviewFeatureId()
Returns the ID for the
Feature that is used to visualize the editing result. |
public void close()
close
in interface AutoCloseable
@NotNull public Map getMap()
@NotNull public FeatureLayer getLayer()
FeatureLayer
on which the feature is edited. The layer can for example be used to retrieve the IFeatureGeometryProvider
.FeatureLayer#getEditCreateGeometryProvider
@NotNull public Observable<Feature> getFeature()
Feature
that is being edited.@NotNull public IFeatureModel getModel()
IFeatureModel
of the Feature
that is being edited.public long getHandleLayerId()
Feature
that is being edited.@NotNull public LayerFeatureId getHandleFeatureId()
IEditHandle
call.@NotNull public LayerFeatureId getPreviewFeatureId()
Feature
that is used to visualize the editing result.
Depending on the configured
ModelUpdateMode
, this can be a different ID.
For ModelUpdateMode#OnAnyChange
, the original layer is used and the id of getFeature()
.
For ModelUpdateMode#OnMajorChanges
and ModelUpdateMode#OnEditFinished
, this is the ID of the a copy of the Feature
, visualized by the handle layer.
This ID can be used for the Map#queryFeatures
method to detect if the currently edited Feature
is touched, for example.
Feature
that is being edited.@NotNull public EditSettings getDefaultSettings()