Package com.luciad.edit.features
Class FeatureEditContext
java.lang.Object
com.luciad.edit.features.FeatureEditContext
- All Implemented Interfaces:
AutoCloseable
FeatureEditContext
provides context information for the feature that is being edited.-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
finalize()
Returns the default edit settings.Observable
<@NotNull Feature> Returns theFeature
that is being edited.Returns the feature ID for the handle to which this context is passed.long
Returns the layer ID of the handle of theFeature
that is being edited.getLayer()
Returns theFeatureLayer
on which the feature is edited.getMap()
Returns the map on which the feature is being edited.getModel()
Returns theIFeatureModel
of theFeature
that is being edited.Returns the ID for theFeature
that is used to visualize the editing result.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
getMap
Returns the map on which the feature is being edited.- Returns:
- the map on which the feature is being edited.
-
getLayer
Returns theFeatureLayer
on which the feature is edited.The layer can for example be used to retrieve the
IFeatureGeometryProvider
.- Returns:
- the
FeatureLayer
on which the feature is edited. - See Also:
-
getFeature
Returns theFeature
that is being edited.- Returns:
- the
Feature
that is being edited.
-
getModel
Returns theIFeatureModel
of theFeature
that is being edited.- Returns:
- the
IFeatureModel
of theFeature
that is being edited.
-
getHandleLayerId
public long getHandleLayerId()Returns the layer ID of the handle of theFeature
that is being edited.- Returns:
- the layer ID of the handle of the
Feature
that is being edited.
-
getHandleFeatureId
Returns the feature ID for the handle to which this context is passed.It can be used to query the map for specific edit handles, for example. This method will throw an exception if it is called outside an
IEditHandle
call.- Returns:
- the feature ID for the handle to which this context is passed.
-
getPreviewFeatureId
Returns the ID for theFeature
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 ofgetFeature()
.For
ModelUpdateMode#OnMajorChanges
andModelUpdateMode#OnEditFinished
, this is the ID of the a copy of theFeature
, visualized by the handle layer.This ID can be used for the
Map#queryFeatures
method to detect if the currently editedFeature
is touched, for example.- Returns:
- the ID for the
Feature
that is being edited.
-
getDefaultSettings
Returns the default edit settings.- Returns:
- the default edit settings.
-