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 isnullas well.auxiliary handle icon: for point handles that require different styling. An example is the insert handle for polylines. SeePointEditHandle.highlightedandactiveauxiliary 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidfinalize()Returns the auxiliary icon foractivehandles.Returns the auxiliary icon forhighlightedhandles.Returns the auxiliary icon forinactivehandles.Returns the complex stroke line style that is used foractivehandles that paint an outline.Returns the complex stroke line style that is used forhighlightedhandles that paint an outline.Returns the complex stroke line style that is used forinactivehandles 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 foractivehandles.Returns the icon forhighlightedhandles.Returns the icon forinactivehandles.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 foractivehandles that paint an outline.Returns the line style that is used forhighlightedhandles that paint an outline.Returns the line style that is used forinactivehandles 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.voidSets the auxiliary icon foractivehandles.voidSets the auxiliary icon forhighlightedhandles.voidSets the auxiliary icon forinactivehandles.voidSets the complex stroke line style that is used foractivehandles that paint an outline.voidSets the complex stroke line style that is used forhighlightedhandles that paint an outline.voidSets the complex stroke line style that is used forinactivehandles that paint an outline.voidsetElevationButton(MouseButton button) Sets the mouse button that is used by handles to modify elevation.voidsetElevationCursor(MouseCursor cursor) Sets the cursor that is used for handles that manipulate elevation.voidsetElevationModifierKeys(ModifierKeys modifierKeys) Sets the modifier keys that are used by handles to modify elevation.voidsetHandleIconActive(IIcon icon) Sets the icon foractivehandles.voidSets the icon forhighlightedhandles.voidsetHandleIconRegular(IIcon icon) Sets the icon forinactivehandles.voidsetInsertButton(MouseButton button) Sets the mouse button that is used by handles to insert something.voidsetInsertCursor(MouseCursor cursor) Sets the cursor that is used for handles that insert something.voidsetInsertModifierKeys(ModifierKeys modifierKeys) Sets the modifier keys that are used by handles to insert something.voidsetMoveButton(MouseButton button) Sets the mouse button that is used by handles to move something.voidsetMoveCursor(MouseCursor cursor) Sets the cursor that is used for handles that move something.voidsetMoveModifierKeys(ModifierKeys modifierKeys) Sets the modifier keys that are used by handles to move something.voidsetOutlineStyleActive(LineStyle style) Sets the line style that is used foractivehandles that paint an outline.voidSets the line style that is used forhighlightedhandles that paint an outline.voidsetOutlineStyleRegular(LineStyle style) Sets the line style that is used forinactivehandles that paint an outline.voidsetPrependAppendButton(MouseButton button) Sets the mouse button that is used by handles that prepend or append something.voidsetPrependAppendCursor(MouseCursor cursor) Sets the cursor that is used for handles that prepend or append something.voidsetPrependAppendModifierKeys(ModifierKeys modifierKeys) Sets the modifier keys that are used by handles to prepend or append something.voidsetRemoveButton(MouseButton button) Sets the mouse button that is used by handles to remove something.voidsetRemoveCursor(MouseCursor cursor) Sets the cursor that is used for handles that remove something.voidsetRemoveModifierKeys(ModifierKeys modifierKeys) Sets the modifier keys that are used by handles to remove something.voidSets the complex stroke line style that is used for shadow lines.voidsetShadowFillStyle(FillStyle style) Sets the fill style that is used when a shadow version of a geometry is painted.voidsetShadowIcon(IIcon icon) Sets the icon that is used when a shadow version of a geometry is painted.voidsetShadowLineStyle(LineStyle style) Sets the line style that is used for shadow lines.voidsetTranslateButton(MouseButton button) Sets the mouse button that is used for translate handles.voidsetTranslateCursor(MouseCursor cursor) Sets the cursor that is used for translate handles.voidsetTranslateModifierKeys(ModifierKeys modifierKeys) Sets the modifier keys that are used by the translate handles.voidSets the complex stroke line style that is used for visual aid lines.voidsetVisualAidLineStyle(LineStyle style) Sets the line style that is used for visual aid lines.
-
Constructor Details
-
EditSettings
public EditSettings()Creates a newEditSettingsinstance with default values.
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getHandleIconRegular
Returns the icon forinactivehandles.- Returns:
- the icon for
inactivehandles.
-
setHandleIconRegular
Sets the icon forinactivehandles.Can be
null. In that case no icon is painted.- Parameters:
icon- the icon forinactivehandles.
-
getHandleIconHighlighted
Returns the icon forhighlightedhandles.- Returns:
- the icon for
highlightedhandles.
-
setHandleIconHighlighted
Sets the icon forhighlightedhandles.Can be
null. In that case no icon is painted.- Parameters:
icon- the icon forhighlightedhandles.
-
getHandleIconActive
Returns the icon foractivehandles.- Returns:
- the icon for
activehandles.
-
setHandleIconActive
Sets the icon foractivehandles.Can be
null. In that case no icon is painted.- Parameters:
icon- the icon foractivehandles.
-
getAuxiliaryHandleIconRegular
Returns the auxiliary icon forinactivehandles.- Returns:
- the auxiliary icon for
inactivehandles.
-
setAuxiliaryHandleIconRegular
Sets the auxiliary icon forinactivehandles.Can be
null. In that case no icon is painted.- Parameters:
icon- the auxiliary icon forinactivehandles.
-
getAuxiliaryHandleIconHighlighted
Returns the auxiliary icon forhighlightedhandles.- Returns:
- the auxiliary icon for
highlightedhandles.
-
setAuxiliaryHandleIconHighlighted
Sets the auxiliary icon forhighlightedhandles.Can be
null. In that case no icon is painted.- Parameters:
icon- the auxiliary icon forhighlighted.
-
getAuxiliaryHandleIconActive
Returns the auxiliary icon foractivehandles.- Returns:
- the auxiliary icon for
activehandles.
-
setAuxiliaryHandleIconActive
Sets the auxiliary icon foractivehandles.Can be
null. In that case no icon is painted.- Parameters:
icon- the auxiliary icon foractivehandles.
-
getOutlineStyleRegular
Returns the line style that is used forinactivehandles that paint an outline.This method is linked to the
getComplexStrokeOutlineStyleRegularmethod:- 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
nullvalue: they are mutually exclusive
- Returns:
- the line style that is used for
inactivehandles that paint an outline.
- if both of them return
-
setOutlineStyleRegular
Sets the line style that is used forinactivehandles that paint an outline.Only one regular line style can be set, if this function is called with a non
nullvalue when aComplexStrokeLineStylehas already been set, it will be overwritten.- Parameters:
style- the line style that is used for handles that manipulate an outline in aEditHandleState#Inactivestate.
-
getComplexStrokeOutlineStyleRegular
Returns the complex stroke line style that is used forinactivehandles that paint an outline.This method is linked to the
getOutlineStyleRegularmethod:- 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
nullvalue: they are mutually exclusive
- Returns:
- the complex stroke line style that is used for
inactivehandles that paint an outline. - Since:
- 2023.1
- if both of them return
-
setComplexStrokeOutlineStyleRegular
Sets the complex stroke line style that is used forinactivehandles that paint an outline.Only one active line style can be set, if this function is called with a non
nullvalue when aLineStylehas already been set, it will be overwritten.- Parameters:
style- the complex stroke line style that is used forinactivehandles that paint an outline.- Since:
- 2023.1
-
getOutlineStyleHighlighted
Returns the line style that is used forhighlightedhandles that paint an outline.This method is linked to the
getComplexStrokeOutlineStyleHighlightedmethod:- 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
nullvalue: they are mutually exclusive
- Returns:
- the line style that is used for
highlightedhandles that paint an outline.
- if both of them return
-
setOutlineStyleHighlighted
Sets the line style that is used forhighlightedhandles that paint an outline.Only one highlighted line style can be set, if this function is called with a non
nullvalue when aComplexStrokeLineStylehas already been set, it will be overwritten.- Parameters:
style- the line style that is used forhighlightedhandles that paint an outline.
-
getComplexStrokeOutlineStyleHighlighted
Returns the complex stroke line style that is used forhighlightedhandles that paint an outline.This method is linked to the
getOutlineStyleHighlightedmethod:- 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
nullvalue: they are mutually exclusive
- Returns:
- the complex stroke line style that is used for
highlightedhandles that paint an outline. - Since:
- 2023.1
- if both of them return
-
setComplexStrokeOutlineStyleHighlighted
Sets the complex stroke line style that is used forhighlightedhandles that paint an outline.Only one active line style can be set, if this function is called with a non
nullvalue when aLineStylehas already been set, it will be overwritten.- Parameters:
style- the complex stroke line style that is used forhighlightedhandles that paint an outline.- Since:
- 2023.1
-
getOutlineStyleActive
Returns the line style that is used foractivehandles that paint an outline.This method is linked to the
getComplexStrokeOutlineStyleActivemethod:- 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
nullvalue: they are mutually exclusive
- Returns:
- the line style that is used for
activehandles that paint an outline.
- if both of them return
-
setOutlineStyleActive
Sets the line style that is used foractivehandles that paint an outline.Only one active line style can be set, if this function is called with a non
nullvalue when aComplexStrokeLineStylehas already been set, it will be overwritten.- Parameters:
style- the line style that is used foractivehandles that paint an outline.
-
getComplexStrokeOutlineStyleActive
Returns the complex stroke line style that is used foractivehandles that paint an outline.This method is linked to the
getOutlineStyleActivemethod:- 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
nullvalue: they are mutually exclusive
- Returns:
- the complex stroke line style that is used for
activehandles that paint an outline. - Since:
- 2023.1
- if both of them return
-
setComplexStrokeOutlineStyleActive
Sets the complex stroke line style that is used foractivehandles that paint an outline.Only one active line style can be set, if this function is called with a non
nullvalue when aLineStylehas already been set, it will be overwritten.- Parameters:
style- the complex stroke line style that is used foractivehandles 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
getVisualAidComplexStrokeLineStylemethod:- 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
nullvalue: 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
nullvalue when aComplexStrokeLineStylehas 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
getVisualAidLineStylemethod:- 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
nullvalue: 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
nullvalue when aComplexStrokeLineStylehas 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
getShadowComplexStrokeLineStylemethod:- 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
nullvalue: 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
nullvalue when aComplexStrokeLineStylehas 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
getShadowLineStylemethod:- 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
nullvalue: 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
nullvalue when aComplexStrokeLineStylehas 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
nullmeans 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
-