Class EditSettings
- All Implemented Interfaces:
AutoCloseable
IFeatureHandlesProvider
and IGeometryHandlesProvider
implementations.
To change the defaults, you can create a new instance of this class, adapt the settings, and configure it on the Editor
class.
These settings are typically used in the following way:
handle icon
: for point handles. SeePointEditHandle
.highlighted handle icon
: for point handles when in a highlighted state. Ifnull
, the regular icon will be used instead.active handle icon
: for point handles when in an active state. Ifnull
, the highlighted icon will be used instead, or the active one if that one isnull
as well.auxiliary handle icon
: for point handles that require different styling. An example is the insert handle for polylines. SeePointEditHandle
.highlighted
andactive
auxiliary icons behave the same as the normal handle icons.outline style
: for handles that manipulate an outlinevisual aid style
: for handles that paint an additional helper line. For example: a vertical line that connects a handle with the terrain. SeePointEditHandle
.shadow icon and styles
: for handles that paint a shadow version of a geometry on the terrain. This is for example done byTranslateEditHandle
.cursors
: you can configure cursors for different types of actionsmouse buttons
: you can configure the mouse button that is used for different types of actionsmodifier keys
: you can configure the modifier keys that are used for different types of actions
If you need to customize edit behavior that is not available in this class, you can do so by creation and customizing the handles directly. The following handle implementations can for example be used and customized:
Most handles providers allow you to specify which handles are used. See for example:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
finalize()
Returns the auxiliary icon foractive
handles.Returns the auxiliary icon forhighlighted
handles.Returns the auxiliary icon forinactive
handles.Returns the complex stroke line style that is used foractive
handles that paint an outline.Returns the complex stroke line style that is used forhighlighted
handles that paint an outline.Returns the complex stroke line style that is used forinactive
handles that paint an outline.Returns the mouse button that is used by handles to modify elevation.Returns the cursor that is used for handles that manipulate elevation.Returns the modifier keys that are used by handles to modify elevation.Returns the icon foractive
handles.Returns the icon forhighlighted
handles.Returns the icon forinactive
handles.Returns the mouse button that is used by handles to insert something.Returns the cursor that is used for handles that insert something.Returns the modifier keys that are used by handles to insert something.Returns the mouse button that is used by handles to move something.Returns the cursor that is used for handles that move something.Returns the modifier keys that are used by handles to move something.Returns the line style that is used foractive
handles that paint an outline.Returns the line style that is used forhighlighted
handles that paint an outline.Returns the line style that is used forinactive
handles that paint an outline.Returns the mouse button that is used by handles that prepend or append something.Returns the cursor that is used for handles that prepend or append something.Returns the modifier keys that are used by handles to prepend or append something.Returns the mouse button that is used by handles to remove something.Returns the cursor that is used for handles that remove something.Returns the modifier keys that are used by handles to remove something.Returns the complex stroke line style that is used for shadow lines.Returns the fill style that is used when a shadow version of a geometry is painted.Returns the icon that is used when a shadow version of a geometry is painted.Returns the line style that is used for shadow lines.Returns the mouse button that is used for translate handles.Returns the cursor that is used for translate handles.Returns the modifier keys that are used by the translate handles.Returns the complex stroke line style that is used for visual aid lines.Returns the line style that is used for visual aid lines.void
Sets the auxiliary icon foractive
handles.void
Sets the auxiliary icon forhighlighted
handles.void
Sets the auxiliary icon forinactive
handles.void
Sets the complex stroke line style that is used foractive
handles that paint an outline.void
Sets the complex stroke line style that is used forhighlighted
handles that paint an outline.void
Sets the complex stroke line style that is used forinactive
handles that paint an outline.void
setElevationButton
(MouseButton button) Sets the mouse button that is used by handles to modify elevation.void
setElevationCursor
(MouseCursor cursor) Sets the cursor that is used for handles that manipulate elevation.void
setElevationModifierKeys
(ModifierKeys modifierKeys) Sets the modifier keys that are used by handles to modify elevation.void
setHandleIconActive
(IIcon icon) Sets the icon foractive
handles.void
Sets the icon forhighlighted
handles.void
setHandleIconRegular
(IIcon icon) Sets the icon forinactive
handles.void
setInsertButton
(MouseButton button) Sets the mouse button that is used by handles to insert something.void
setInsertCursor
(MouseCursor cursor) Sets the cursor that is used for handles that insert something.void
setInsertModifierKeys
(ModifierKeys modifierKeys) Sets the modifier keys that are used by handles to insert something.void
setMoveButton
(MouseButton button) Sets the mouse button that is used by handles to move something.void
setMoveCursor
(MouseCursor cursor) Sets the cursor that is used for handles that move something.void
setMoveModifierKeys
(ModifierKeys modifierKeys) Sets the modifier keys that are used by handles to move something.void
setOutlineStyleActive
(LineStyle style) Sets the line style that is used foractive
handles that paint an outline.void
Sets the line style that is used forhighlighted
handles that paint an outline.void
setOutlineStyleRegular
(LineStyle style) Sets the line style that is used forinactive
handles that paint an outline.void
setPrependAppendButton
(MouseButton button) Sets the mouse button that is used by handles that prepend or append something.void
setPrependAppendCursor
(MouseCursor cursor) Sets the cursor that is used for handles that prepend or append something.void
setPrependAppendModifierKeys
(ModifierKeys modifierKeys) Sets the modifier keys that are used by handles to prepend or append something.void
setRemoveButton
(MouseButton button) Sets the mouse button that is used by handles to remove something.void
setRemoveCursor
(MouseCursor cursor) Sets the cursor that is used for handles that remove something.void
setRemoveModifierKeys
(ModifierKeys modifierKeys) Sets the modifier keys that are used by handles to remove something.void
Sets the complex stroke line style that is used for shadow lines.void
setShadowFillStyle
(FillStyle style) Sets the fill style that is used when a shadow version of a geometry is painted.void
setShadowIcon
(IIcon icon) Sets the icon that is used when a shadow version of a geometry is painted.void
setShadowLineStyle
(LineStyle style) Sets the line style that is used for shadow lines.void
setTranslateButton
(MouseButton button) Sets the mouse button that is used for translate handles.void
setTranslateCursor
(MouseCursor cursor) Sets the cursor that is used for translate handles.void
setTranslateModifierKeys
(ModifierKeys modifierKeys) Sets the modifier keys that are used by the translate handles.void
Sets the complex stroke line style that is used for visual aid lines.void
setVisualAidLineStyle
(LineStyle style) Sets the line style that is used for visual aid lines.
-
Constructor Details
-
EditSettings
public EditSettings()Creates a newEditSettings
instance with default values.
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
getHandleIconRegular
Returns the icon forinactive
handles.- Returns:
- the icon for
inactive
handles.
-
setHandleIconRegular
Sets the icon forinactive
handles.Can be
null
. In that case no icon is painted.- Parameters:
icon
- the icon forinactive
handles.
-
getHandleIconHighlighted
Returns the icon forhighlighted
handles.- Returns:
- the icon for
highlighted
handles.
-
setHandleIconHighlighted
Sets the icon forhighlighted
handles.Can be
null
. In that case no icon is painted.- Parameters:
icon
- the icon forhighlighted
handles.
-
getHandleIconActive
Returns the icon foractive
handles.- Returns:
- the icon for
active
handles.
-
setHandleIconActive
Sets the icon foractive
handles.Can be
null
. In that case no icon is painted.- Parameters:
icon
- the icon foractive
handles.
-
getAuxiliaryHandleIconRegular
Returns the auxiliary icon forinactive
handles.- Returns:
- the auxiliary icon for
inactive
handles.
-
setAuxiliaryHandleIconRegular
Sets the auxiliary icon forinactive
handles.Can be
null
. In that case no icon is painted.- Parameters:
icon
- the auxiliary icon forinactive
handles.
-
getAuxiliaryHandleIconHighlighted
Returns the auxiliary icon forhighlighted
handles.- Returns:
- the auxiliary icon for
highlighted
handles.
-
setAuxiliaryHandleIconHighlighted
Sets the auxiliary icon forhighlighted
handles.Can be
null
. In that case no icon is painted.- Parameters:
icon
- the auxiliary icon forhighlighted
.
-
getAuxiliaryHandleIconActive
Returns the auxiliary icon foractive
handles.- Returns:
- the auxiliary icon for
active
handles.
-
setAuxiliaryHandleIconActive
Sets the auxiliary icon foractive
handles.Can be
null
. In that case no icon is painted.- Parameters:
icon
- the auxiliary icon foractive
handles.
-
getOutlineStyleRegular
Returns the line style that is used forinactive
handles that paint an outline.This method is linked to the
getComplexStrokeOutlineStyleRegular
method:- if both of them return
null
, no outline is painted - if one of them is not
null
, that line style is used - it's not possible for both methods to return a non
null
value: they are mutually exclusive
- Returns:
- the line style that is used for
inactive
handles that paint an outline.
- if both of them return
-
setOutlineStyleRegular
Sets the line style that is used forinactive
handles that paint an outline.Only one regular line style can be set, if this function is called with a non
null
value when aComplexStrokeLineStyle
has already been set, it will be overwritten.- Parameters:
style
- the line style that is used for handles that manipulate an outline in aEditHandleState#Inactive
state.
-
getComplexStrokeOutlineStyleRegular
Returns the complex stroke line style that is used forinactive
handles that paint an outline.This method is linked to the
getOutlineStyleRegular
method:- if both of them return
null
, no outline is painted - if one of them is not
null
, that line style is used - it's not possible for both methods to return a non
null
value: they are mutually exclusive
- Returns:
- the complex stroke line style that is used for
inactive
handles that paint an outline. - Since:
- 2023.1
- if both of them return
-
setComplexStrokeOutlineStyleRegular
Sets the complex stroke line style that is used forinactive
handles that paint an outline.Only one active line style can be set, if this function is called with a non
null
value when aLineStyle
has already been set, it will be overwritten.- Parameters:
style
- the complex stroke line style that is used forinactive
handles that paint an outline.- Since:
- 2023.1
-
getOutlineStyleHighlighted
Returns the line style that is used forhighlighted
handles that paint an outline.This method is linked to the
getComplexStrokeOutlineStyleHighlighted
method:- if both of them return
null
, no outline is painted - if one of them is not
null
, that line style is used - it's not possible for both methods to return a non
null
value: they are mutually exclusive
- Returns:
- the line style that is used for
highlighted
handles that paint an outline.
- if both of them return
-
setOutlineStyleHighlighted
Sets the line style that is used forhighlighted
handles that paint an outline.Only one highlighted line style can be set, if this function is called with a non
null
value when aComplexStrokeLineStyle
has already been set, it will be overwritten.- Parameters:
style
- the line style that is used forhighlighted
handles that paint an outline.
-
getComplexStrokeOutlineStyleHighlighted
Returns the complex stroke line style that is used forhighlighted
handles that paint an outline.This method is linked to the
getOutlineStyleHighlighted
method:- if both of them return
null
, no outline is painted - if one of them is not
null
, that line style is used - it's not possible for both methods to return a non
null
value: they are mutually exclusive
- Returns:
- the complex stroke line style that is used for
highlighted
handles that paint an outline. - Since:
- 2023.1
- if both of them return
-
setComplexStrokeOutlineStyleHighlighted
Sets the complex stroke line style that is used forhighlighted
handles that paint an outline.Only one active line style can be set, if this function is called with a non
null
value when aLineStyle
has already been set, it will be overwritten.- Parameters:
style
- the complex stroke line style that is used forhighlighted
handles that paint an outline.- Since:
- 2023.1
-
getOutlineStyleActive
Returns the line style that is used foractive
handles that paint an outline.This method is linked to the
getComplexStrokeOutlineStyleActive
method:- if both of them return
null
, no outline is painted - if one of them is not
null
, that line style is used - it's not possible for both methods to return a non
null
value: they are mutually exclusive
- Returns:
- the line style that is used for
active
handles that paint an outline.
- if both of them return
-
setOutlineStyleActive
Sets the line style that is used foractive
handles that paint an outline.Only one active line style can be set, if this function is called with a non
null
value when aComplexStrokeLineStyle
has already been set, it will be overwritten.- Parameters:
style
- the line style that is used foractive
handles that paint an outline.
-
getComplexStrokeOutlineStyleActive
Returns the complex stroke line style that is used foractive
handles that paint an outline.This method is linked to the
getOutlineStyleActive
method:- if both of them return
null
, no outline is painted - if one of them is not
null
, that line style is used - it's not possible for both methods to return a non
null
value: they are mutually exclusive
- Returns:
- the complex stroke line style that is used for
active
handles that paint an outline. - Since:
- 2023.1
- if both of them return
-
setComplexStrokeOutlineStyleActive
Sets the complex stroke line style that is used foractive
handles that paint an outline.Only one active line style can be set, if this function is called with a non
null
value when aLineStyle
has already been set, it will be overwritten.- Parameters:
style
- the complex stroke line style that is used foractive
handles that paint an outline.- Since:
- 2023.1
-
getVisualAidLineStyle
Returns the line style that is used for visual aid lines.This method is linked to the
getVisualAidComplexStrokeLineStyle
method:- if both of them return
null
, no visual aid line is painted - if one of them is not
null
, that visual aid line style is used - it's not possible for both methods to return a non
null
value: they are mutually exclusive
- Returns:
- the line style that is used for visual aid lines.
- if both of them return
-
setVisualAidLineStyle
Sets the line style that is used for visual aid lines.Only one visual aid line style can be set, if this function is called with a non
null
value when aComplexStrokeLineStyle
has already been set, it will be overwritten.- Parameters:
style
- the line style that is used for visual aid lines.
-
getVisualAidComplexStrokeLineStyle
Returns the complex stroke line style that is used for visual aid lines.This method is linked to the
getVisualAidLineStyle
method:- if both of them return
null
, no visual aid line is painted - if one of them is not
null
, that visual aid line style is used - it's not possible for both methods to return a non
null
value: they are mutually exclusive
- Returns:
- the complex stroke line style that is used for visual aid lines.
- Since:
- 2023.1
- if both of them return
-
setVisualAidComplexStrokeLineStyle
Sets the complex stroke line style that is used for visual aid lines.Only one visual aid line style can be set, if this function is called with a non
null
value when aComplexStrokeLineStyle
has already been set, it will be overwritten.- Parameters:
style
- the complex stroke line style that is used for visual aid lines.- Since:
- 2023.1
-
getShadowIcon
Returns the icon that is used when a shadow version of a geometry is painted.- Returns:
- the icon that is used when a shadow version of a geometry is painted.
-
setShadowIcon
Sets the icon that is used when a shadow version of a geometry is painted.Can be
null
. In that case no icon is painted.- Parameters:
icon
- the icon that is used when a shadow version of a geometry is painted.
-
getShadowLineStyle
Returns the line style that is used for shadow lines.This method is linked to the
getShadowComplexStrokeLineStyle
method:- if both of them return
null
, no shadow line is painted - if one of them is not
null
, that shadow line style is used - it's not possible for both methods to return a non
null
value: they are mutually exclusive
- Returns:
- the line style that is used for shadow lines.
- if both of them return
-
setShadowLineStyle
Sets the line style that is used for shadow lines.Only one shadow line style can be set, if this function is called with a non
null
value when aComplexStrokeLineStyle
has already been set, it will be overwritten.- Parameters:
style
- the line style that is used for shadow lines.
-
getShadowComplexStrokeLineStyle
Returns the complex stroke line style that is used for shadow lines.This method is linked to the
getShadowLineStyle
method:- if both of them return
null
, no shadow line is painted - if one of them is not
null
, that shadow line style is used - it's not possible for both methods to return a non
null
value: they are mutually exclusive
- Returns:
- the complex stroke line style that is used for shadow lines.
- Since:
- 2023.1
- if both of them return
-
setShadowComplexStrokeLineStyle
Sets the complex stroke line style that is used for shadow lines.Only one shadow line style can be set, if this function is called with a non
null
value when aComplexStrokeLineStyle
has already been set, it will be overwritten.- Parameters:
style
- the complex stroke line style that is used for shadow lines.- Since:
- 2023.1
-
getShadowFillStyle
Returns the fill style that is used when a shadow version of a geometry is painted.- Returns:
- the fill style that is used when a shadow version of a geometry is painted.
-
setShadowFillStyle
Sets the fill style that is used when a shadow version of a geometry is painted.Setting this to
null
means the shadow version of the geometry won't have a fill style.- Parameters:
style
- fill style that is used when a shadow version of a geometry is painted.
-
getTranslateCursor
Returns the cursor that is used for translate handles.- Returns:
- the cursor that is used for translate handles.
-
setTranslateCursor
Sets the cursor that is used for translate handles.- Parameters:
cursor
- the cursor that is used for translate handles
-
getMoveCursor
Returns the cursor that is used for handles that move something.- Returns:
- the cursor that is used for handles that move something.
-
setMoveCursor
Sets the cursor that is used for handles that move something.- Parameters:
cursor
- the cursor that is used for handles that move something
-
getRemoveCursor
Returns the cursor that is used for handles that remove something.- Returns:
- the cursor that is used for handles that remove something.
-
setRemoveCursor
Sets the cursor that is used for handles that remove something.- Parameters:
cursor
- the cursor that is used for handles that remove something
-
getInsertCursor
Returns the cursor that is used for handles that insert something.- Returns:
- the cursor that is used for handles that insert something.
-
setInsertCursor
Sets the cursor that is used for handles that insert something.- Parameters:
cursor
- the cursor that is used for handles that insert something
-
getPrependAppendCursor
Returns the cursor that is used for handles that prepend or append something.- Returns:
- the cursor that is used for handles that prepend or append something.
-
setPrependAppendCursor
Sets the cursor that is used for handles that prepend or append something.- Parameters:
cursor
- the cursor that is used for handles that prepend or append something
-
getElevationCursor
Returns the cursor that is used for handles that manipulate elevation.- Returns:
- the cursor that is used for handles that manipulate elevation.
-
setElevationCursor
Sets the cursor that is used for handles that manipulate elevation.- Parameters:
cursor
- the cursor that is used for handles that manipulate elevation
-
getTranslateButton
Returns the mouse button that is used for translate handles.- Returns:
- the mouse button that is used for translate handles.
-
setTranslateButton
Sets the mouse button that is used for translate handles.- Parameters:
button
- the mouse button that is used for translate handles
-
getMoveButton
Returns the mouse button that is used by handles to move something.- Returns:
- the mouse button that is used by handles to move something.
-
setMoveButton
Sets the mouse button that is used by handles to move something.- Parameters:
button
- the mouse button that is used by handles to move something
-
getRemoveButton
Returns the mouse button that is used by handles to remove something.- Returns:
- the mouse button that is used by handles to remove something.
-
setRemoveButton
Sets the mouse button that is used by handles to remove something.- Parameters:
button
- the mouse button that is used by handles to remove something
-
getInsertButton
Returns the mouse button that is used by handles to insert something.- Returns:
- the mouse button that is used by handles to insert something.
-
setInsertButton
Sets the mouse button that is used by handles to insert something.- Parameters:
button
- the mouse button that is used by handles to insert something
-
getPrependAppendButton
Returns the mouse button that is used by handles that prepend or append something.- Returns:
- the mouse button that is used by handles that prepend or append something.
-
setPrependAppendButton
Sets the mouse button that is used by handles that prepend or append something.- Parameters:
button
- the mouse button that is used by handles that prepend or append something
-
getElevationButton
Returns the mouse button that is used by handles to modify elevation.- Returns:
- the mouse button that is used by handles to modify elevation.
-
setElevationButton
Sets the mouse button that is used by handles to modify elevation.- Parameters:
button
- the mouse button that is used by handles to modify elevation
-
getTranslateModifierKeys
Returns the modifier keys that are used by the translate handles.- Returns:
- the modifier keys that are used by the translate handles.
-
setTranslateModifierKeys
Sets the modifier keys that are used by the translate handles.- Parameters:
modifierKeys
- the modifier keys that are used by the translate handles
-
getMoveModifierKeys
Returns the modifier keys that are used by handles to move something.- Returns:
- the modifier keys that are used by handles to move something.
-
setMoveModifierKeys
Sets the modifier keys that are used by handles to move something.- Parameters:
modifierKeys
- the modifier keys that are used by handles to move something
-
getRemoveModifierKeys
Returns the modifier keys that are used by handles to remove something.- Returns:
- the modifier keys that are used by handles to remove something.
-
setRemoveModifierKeys
Sets the modifier keys that are used by handles to remove something.- Parameters:
modifierKeys
- the modifier keys that are used by handles to remove something
-
getInsertModifierKeys
Returns the modifier keys that are used by handles to insert something.- Returns:
- the modifier keys that are used by handles to insert something.
-
setInsertModifierKeys
Sets the modifier keys that are used by handles to insert something.- Parameters:
modifierKeys
- the modifier keys that are used by handles to insert something
-
getPrependAppendModifierKeys
Returns the modifier keys that are used by handles to prepend or append something.- Returns:
- the modifier keys that are used by handles to prepend or append something.
-
setPrependAppendModifierKeys
Sets the modifier keys that are used by handles to prepend or append something.- Parameters:
modifierKeys
- the modifier keys that are used by handles to prepend or append something
-
getElevationModifierKeys
Returns the modifier keys that are used by handles to modify elevation.- Returns:
- the modifier keys that are used by handles to modify elevation.
-
setElevationModifierKeys
Sets the modifier keys that are used by handles to modify elevation.- Parameters:
modifierKeys
- the modifier keys that are used by handles to modify elevation
-