public final class FeatureEditConfigurationBuilder extends Object implements AutoCloseable
See FeatureLayer.Builder#editConfiguration
.
See the related guide for more configuration options.
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
finalize() |
FeatureEditConfigurationBuilder |
handlesProvider(IFeatureHandlesProvider handlesProvider)
Configures the handles provider that is used to provide the
edit handles for a feature. |
void |
notEditable()
Disable editing for the current feature.
|
void |
submit()
Submits the information to this builder, and confirm that the current feature can be edited.
|
FeatureEditConfigurationBuilder |
updateMode(ModelUpdateMode updateMode)
This setting gives more control over when and how often the model is updated during interactive editing.
|
public void close()
close
in interface AutoCloseable
@NotNull public FeatureEditConfigurationBuilder handlesProvider(@NotNull IFeatureHandlesProvider handlesProvider) throws NullPointerException
edit handles
for a feature.
Calling this method is optional. If this method is not called, a default implementation will be configured. See CompositeFeatureHandlesProvider#createDefault()
.
handlesProvider
- a handles provider for Features, cannot be null
NullPointerException
- when null
is passed.@NotNull public FeatureEditConfigurationBuilder updateMode(@NotNull ModelUpdateMode updateMode)
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
.
updateMode
- the update modepublic void notEditable()
Either this method, or the submit()
method must be called.
Note: you can disable editing for all features of a layer by not configuring
an IFeatureEditConfiguration
.
public void submit() throws IllegalStateException
Either this method, or the notEditable
method must be called.
IllegalStateException
- on an illegal state, e.g. when already submitted.