public final class EditSettings extends Object implements 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. See PointEditHandle
.
highlighted handle icon
: for point handles when in a highlighted state. If null
, the regular icon will be used instead.
active handle icon
: for point handles when in an active state. If null
, the highlighted icon will be used instead, or the active one if that one is null
as well.
auxiliary handle icon
: for point handles that require different styling. An example is the insert handle for polylines. See PointEditHandle
. highlighted
and active
auxiliary icons behave the same as the normal handle icons.
outline style
: for handles that manipulate an outline
visual aid style
: for handles that paint an additional helper line. For example: a vertical line that connects a handle with the terrain. See PointEditHandle
.
shadow icon and styles
: for handles that paint a shadow version of a geometry on the terrain. This is for example done by TranslateEditHandle
.
cursors
: you can configure cursors for different types of actions
mouse buttons
: you can configure the mouse button that is used for different types of actions
modifier 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 and Description |
---|
EditSettings()
Creates a new
EditSettings instance with default values. |
public EditSettings()
EditSettings
instance with default values.public void close()
close
in interface AutoCloseable
@Nullable public IIcon getHandleIconRegular()
inactive
handles.public void setHandleIconRegular(@Nullable IIcon icon)
icon
- the icon for inactive
handles. Can be null
. In that case no icon is painted.@Nullable public IIcon getHandleIconHighlighted()
highlighted
handles.public void setHandleIconHighlighted(@Nullable IIcon icon)
icon
- the icon for highlighted
handles. Can be null
. In that case no icon is painted.@Nullable public IIcon getHandleIconActive()
active
handles.public void setHandleIconActive(@Nullable IIcon icon)
icon
- the icon for active
handles. Can be null
. In that case no icon is painted.@Nullable public IIcon getAuxiliaryHandleIconRegular()
inactive
handles.public void setAuxiliaryHandleIconRegular(@Nullable IIcon icon)
icon
- the auxiliary icon for inactive
handles. Can be null
. In that case no icon is painted.@Nullable public IIcon getAuxiliaryHandleIconHighlighted()
highlighted
handles.public void setAuxiliaryHandleIconHighlighted(@Nullable IIcon icon)
icon
- the auxiliary icon for highlighted
. Can be null
. In that case no icon is painted.@Nullable public IIcon getAuxiliaryHandleIconActive()
active
handles.public void setAuxiliaryHandleIconActive(@Nullable IIcon icon)
icon
- the auxiliary icon for active
handles. Can be null
. In that case no icon is painted.@Nullable public LineStyle getOutlineStyleRegular()
inactive
handles that display an outline.
This method is linked to the getComplexStrokeOutlineStyleRegular
method:
null
, no outline is painted
null
, that line style is used
null
value: they are mutually exclusive
inactive
handles that paint an outline.public void setOutlineStyleRegular(@Nullable LineStyle style)
EditHandleState#Inactive
state that paint an outline.
Only one regular line style can be set, if this function is called with a non null
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style
- the line style that is used for handles that manipulate an outline in a EditHandleState#Inactive
state.@Nullable public ComplexStrokeLineStyle getComplexStrokeOutlineStyleRegular()
inactive
handles that paint an outline.
This method is linked to the getOutlineStyleRegular
method:
null
, no outline is painted
null
, that line style is used
null
value: they are mutually exclusive
inactive
handles that paint an outline.public void setComplexStrokeOutlineStyleRegular(@Nullable ComplexStrokeLineStyle style)
inactive
handles that paint an outline.
Only one active line style can be set, if this function is called with a non null
value when a LineStyle
has already been set, it will be overwritten.
style
- the complex stroke line style that is used for inactive
handles that paint an outline.@Nullable public LineStyle getOutlineStyleHighlighted()
highlighted
handles that display an outline.
This method is linked to the getComplexStrokeOutlineStyleHighlighted
method:
null
, no outline is painted
null
, that line style is used
null
value: they are mutually exclusive
highlighted
handles that paint an outline.public void setOutlineStyleHighlighted(@Nullable LineStyle style)
highlighted
handles that paint an outline.
Only one highlighted line style can be set, if this function is called with a non null
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style
- the line style that is used for highlighted
handles that paint an outline.@Nullable public ComplexStrokeLineStyle getComplexStrokeOutlineStyleHighlighted()
highlighted
handles that paint an outline.
This method is linked to the getOutlineStyleHighlighted
method:
null
, no outline is painted
null
, that line style is used
null
value: they are mutually exclusive
highlighted
handles that paint an outline.public void setComplexStrokeOutlineStyleHighlighted(@Nullable ComplexStrokeLineStyle style)
highlighted
handles that paint an outline.
Only one active line style can be set, if this function is called with a non null
value when a LineStyle
has already been set, it will be overwritten.
style
- the complex stroke line style that is used for highlighted
handles that paint an outline.@Nullable public LineStyle getOutlineStyleActive()
active
handles that display an outline.
This method is linked to the getComplexStrokeOutlineStyleActive
method:
null
, no outline is painted
null
, that line style is used
null
value: they are mutually exclusive
active
handles that paint an outline.public void setOutlineStyleActive(@Nullable LineStyle style)
active
handles that paint an outline.
Only one active line style can be set, if this function is called with a non null
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style
- the line style that is used for active
handles that paint an outline.@Nullable public ComplexStrokeLineStyle getComplexStrokeOutlineStyleActive()
active
handles that paint an outline.
This method is linked to the getOutlineStyleActive
method:
null
, no outline is painted
null
, that line style is used
null
value: they are mutually exclusive
active
handles that paint an outline.public void setComplexStrokeOutlineStyleActive(@Nullable ComplexStrokeLineStyle style)
active
handles that paint an outline.
Only one active line style can be set, if this function is called with a non null
value when a LineStyle
has already been set, it will be overwritten.
style
- the complex stroke line style that is used for active
handles that paint an outline.@Nullable public LineStyle getVisualAidLineStyle()
This method is linked to the getVisualAidComplexStrokeLineStyle
method:
null
, no visual aid line is painted
null
, that visual aid line style is used
null
value: they are mutually exclusive
public void setVisualAidLineStyle(@Nullable LineStyle style)
Only one visual aid line style can be set, if this function is called with a non null
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style
- the line style that is used for visual aid lines.@Nullable public ComplexStrokeLineStyle getVisualAidComplexStrokeLineStyle()
This method is linked to the getVisualAidLineStyle
method:
null
, no visual aid line is painted
null
, that visual aid line style is used
null
value: they are mutually exclusive
public void setVisualAidComplexStrokeLineStyle(@Nullable ComplexStrokeLineStyle style)
Only one visual aid line style can be set, if this function is called with a non null
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style
- the complex stroke line style that is used for visual aid lines.@Nullable public IIcon getShadowIcon()
public void setShadowIcon(@Nullable IIcon icon)
icon
- the icon that is used when a shadow version of a geometry is painted. Can be null
. In that case no icon is painted.@Nullable public LineStyle getShadowLineStyle()
This method is linked to the getShadowComplexStrokeLineStyle
method:
null
, no shadow line is painted
null
, that shadow line style is used
null
value: they are mutually exclusive
public void setShadowLineStyle(@Nullable LineStyle style)
Only one shadow line style can be set, if this function is called with a non null
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style
- the line style that is used for shadow lines.@Nullable public ComplexStrokeLineStyle getShadowComplexStrokeLineStyle()
This method is linked to the getShadowLineStyle
method:
null
, no shadow line is painted
null
, that shadow line style is used
null
value: they are mutually exclusive
public void setShadowComplexStrokeLineStyle(@Nullable ComplexStrokeLineStyle style)
Only one shadow line style can be set, if this function is called with a non null
value when a ComplexStrokeLineStyle
has already been set, it will be overwritten.
style
- the complex stroke line style that is used for shadow lines.@Nullable public FillStyle getShadowFillStyle()
public void setShadowFillStyle(@Nullable FillStyle style)
Setting this to null
means the shadow version of the geometry won't have a fill style.
style
- fill style that is used when a shadow version of a geometry is painted.@NotNull public MouseCursor getTranslateCursor()
public void setTranslateCursor(@NotNull MouseCursor cursor)
cursor
- the cursor that is used for translate handles@NotNull public MouseCursor getMoveCursor()
public void setMoveCursor(@NotNull MouseCursor cursor)
cursor
- the cursor that is used for handles that move something@NotNull public MouseCursor getRemoveCursor()
public void setRemoveCursor(@NotNull MouseCursor cursor)
cursor
- the cursor that is used for handles that remove something@NotNull public MouseCursor getInsertCursor()
public void setInsertCursor(@NotNull MouseCursor cursor)
cursor
- the cursor that is used for handles that insert something@NotNull public MouseCursor getPrependAppendCursor()
public void setPrependAppendCursor(@NotNull MouseCursor cursor)
cursor
- the cursor that is used for handles that prepend or append something@NotNull public MouseCursor getElevationCursor()
public void setElevationCursor(@NotNull MouseCursor cursor)
cursor
- the cursor that is used for handles that manipulate elevation@NotNull public MouseButton getTranslateButton()
public void setTranslateButton(@NotNull MouseButton button)
button
- the mouse button that is used for translate handles@NotNull public MouseButton getMoveButton()
public void setMoveButton(@NotNull MouseButton button)
button
- the mouse button that is used by handles to move something@NotNull public MouseButton getRemoveButton()
public void setRemoveButton(@NotNull MouseButton button)
button
- the mouse button that is used by handles to remove something@NotNull public MouseButton getInsertButton()
public void setInsertButton(@NotNull MouseButton button)
button
- the mouse button that is used by handles to insert something@NotNull public MouseButton getPrependAppendButton()
public void setPrependAppendButton(@NotNull MouseButton button)
button
- the mouse button that is used by handles that prepend or append something@NotNull public MouseButton getElevationButton()
public void setElevationButton(@NotNull MouseButton button)
button
- the mouse button that is used by handles to modify elevation@NotNull public ModifierKeys getTranslateModifierKeys()
public void setTranslateModifierKeys(@NotNull ModifierKeys modifierKeys)
modifierKeys
- the modifier keys that are used by the translate handles@NotNull public ModifierKeys getMoveModifierKeys()
public void setMoveModifierKeys(@NotNull ModifierKeys modifierKeys)
modifierKeys
- the modifier keys that are used by handles to move something@NotNull public ModifierKeys getRemoveModifierKeys()
public void setRemoveModifierKeys(@NotNull ModifierKeys modifierKeys)
modifierKeys
- the modifier keys that are used by handles to remove something@NotNull public ModifierKeys getInsertModifierKeys()
public void setInsertModifierKeys(@NotNull ModifierKeys modifierKeys)
modifierKeys
- the modifier keys that are used by handles to insert something@NotNull public ModifierKeys getPrependAppendModifierKeys()
public void setPrependAppendModifierKeys(@NotNull ModifierKeys modifierKeys)
modifierKeys
- the modifier keys that are used by handles to prepend or append something@NotNull public ModifierKeys getElevationModifierKeys()
public void setElevationModifierKeys(@NotNull ModifierKeys modifierKeys)
modifierKeys
- the modifier keys that are used by handles to modify elevation