Class Editor.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
Editor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a new editor, based on the properties set on this builder.voidclose()defaultSettings(EditSettings editSettings) Sets the default settings that can be used by the handles that are used to edit features and geometries.editCandidateProvider(IFeatureEditCandidateProvider editCandidateProvider) Sets theIFeatureEditCandidateProviderto use.protected voidfinalize()Sets the map on which features are edited.mouseCursorCallback(IMouseCursorCallback mouseCursorCallback) Sets theIMouseCursorCallbackto use.
-
Constructor Details
-
Builder
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
build
Returns a new editor, based on the properties set on this builder.- Returns:
- a new editor.
- Throws:
IllegalStateException- if not all mandatory parameters are set
-
map
Sets the map on which features are edited.This parameter is mandatory. If it is not set,
Editor.Builder#buildwill throw an exception.- Parameters:
map- theMapon which to edit features- Returns:
- this builder
- Throws:
NullPointerException- whennullis passed.
-
editCandidateProvider
@NotNull public Editor.Builder editCandidateProvider(@NotNull IFeatureEditCandidateProvider editCandidateProvider) throws NullPointerException Sets theIFeatureEditCandidateProviderto use.This parameter is optional. When it is not set, edit candidates will be based on selection through
FeatureStateEditCandidateProvider.- Parameters:
editCandidateProvider- the edit candidate provider to use.- Returns:
- this builder
- Throws:
NullPointerException- whennullis passed.
-
mouseCursorCallback
@NotNull public Editor.Builder mouseCursorCallback(@Nullable IMouseCursorCallback mouseCursorCallback) Sets theIMouseCursorCallbackto use.This callback is called when the
Editor's cursor has changed.Typically, this method is called by an
IControllerimplementation that supportsFeatureediting. This implementation can callMap#setCursorto effectively change the mouse cursor.This callback is called on the UI thread only.
This parameter is optional.
- Parameters:
mouseCursorCallback- a callback that is called when the editor's cursor has changed.- Returns:
- this builder
-
defaultSettings
@NotNull public Editor.Builder defaultSettings(@NotNull EditSettings editSettings) throws NullPointerException Sets the default settings that can be used by the handles that are used to edit features and geometries.FeatureandGeometryimplementations are encouraged to use these default settings. The settings are available in thecontextgiven as parameter to their methods.This parameter is optional. If it is not provided, a default
EditSettingsinstance will be used.- Parameters:
editSettings- the default settings to use. Should not benull.- Returns:
- this builder
- Throws:
NullPointerException- whennullis passed.
-