Package com.luciad.edit.features
Class FeatureEditConfigurationBuilder
java.lang.Object
com.luciad.edit.features.FeatureEditConfigurationBuilder
- All Implemented Interfaces:
AutoCloseable
This builder can be used to configure editing for a layer.
See FeatureLayer.Builder#editConfiguration
.
See the related guide for more configuration options.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
finalize()
handlesProvider
(IFeatureHandlesProvider handlesProvider) Configures the handles provider that is used to provide theedit handles
for a feature.void
Disable editing for the current feature.void
submit()
Submits the information to this builder, and confirm that the current feature can be edited.updateMode
(ModelUpdateMode updateMode) This setting gives more control over when and how often the model is updated during interactive editing.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
handlesProvider
@NotNull public FeatureEditConfigurationBuilder handlesProvider(@NotNull IFeatureHandlesProvider handlesProvider) throws NullPointerException Configures the handles provider that is used to provide theedit handles
for a feature.Calling this method is optional. If this method is not called, a default implementation will be configured. See
CompositeFeatureHandlesProvider#createDefault()
.- Parameters:
handlesProvider
- a handles provider for Features, cannot benull
- Returns:
- this
- Throws:
NullPointerException
- whennull
is passed.
-
updateMode
This setting gives more control over when and how often the model is updated during interactive editing.It is useful to make sure that the model is updated less often when model updates are expensive, for example for models with a database backend, or other models that don't keep
Feature
state in memory.The default is
ModelUpdateMode#OnAnyChange
.- Parameters:
updateMode
- the update mode- Returns:
- this
-
notEditable
public void notEditable()Disable editing for the current feature.Either this method, or the
submit()
method must be called.Note: you can disable editing for all features of a layer by not
configuring
anIFeatureEditConfiguration
. -
submit
Submits the information to this builder, and confirm that the current feature can be edited.Either this method, or the
notEditable
method must be called.- Throws:
IllegalStateException
- on an illegal state, e.g. when already submitted.
-