Class InteractionConfiguration
VertexTool
, FreehandTool
, or
ShapeTool
.
An InteractionConfiguration allows you to customize the interactive geometry editing experience to suit your specific users. For example:
- Disable vertex, mid-vertex, and part selection (
allowVertexCreationProperty()
,allowMidVertexSelectionProperty()
,allowPartCreationProperty()
) to define a tool to only move the complete geometry. - Disable moving the selected element (
allowMovingSelectedElementProperty()
) but allow all selections, and provide a tool for a user to enter new coordinates instead of moving interactively.
GeometryEditorElement
to select the different types of
GeometryEditorElement
representing vertices, parts, and the entire geometry. For example if all elements are
allowed to be selected:
- Tap twice on a vertex of a
Multipoint
to select first the vertex and then the entire multipoint geometry - Tap three times on a vertex of a
Polyline
orPolygon
to select first the vertex, then the part, and then the entire geometry - Tap twice on an edge of a
Polyline
orPolygon
to select first the part and then the entire geometry - Tap twice on a fill of a
Polygon
to select first the part and then the entire geometry
InteractionConfiguration.allowMovingSelectedElementProperty()
,
allowRotatingSelectedElementProperty()
, and
allowScalingSelectedElementProperty()
, visual handles are displayed to help the user move,
rotate, or scale the selected element.
You can change the interaction properties of a tool at any point, including when a geometry editor is started
(GeometryEditor.startedProperty()
= true) and the tool is in use by the editor. If you change a property that
disallows an in-progress interaction, then the interaction is cancelled and does not affect the state of the
GeometryEditor
.
Changing InteractionConfiguration properties affects whether types of interaction (such as tapping or
dragging) to add new vertices or parts are enabled or not, but never affects the type of interaction used by
each different GeometryEditorTool
to create new vertices and parts. For example, a VertexTool
adds
vertices in response to a tap, whereas both FreehandTool
and ShapeTool
add parts in response to a drag
operation but never in response to a tap.
Convenience methods are available to quickly set all properties relative to a category of interaction - for
example use setAllowSelection(boolean)
to change all selection interactions,
and setAllowTransformation(boolean)
to change all properties that control geometry
transformation.
- Since:
- 200.1.0
- See Also:
-
Property Summary
TypePropertyDescriptionTrue if the selectedGeometryEditorElement
can be interactively deleted, false otherwise.True if the entire geometry can be interactively selected, false otherwise.True if a mid-vertex of a polygon or polyline can be interactively selected, false otherwise.True if the selectedGeometryEditorElement
can be interactively moved, false otherwise.True if you can interactively create a new part in a polyline or polygon, false otherwise.True to allow you to interactively rotate the selectedGeometryEditorElement
, false otherwise.True to allow you to interactively scale the selectedGeometryEditorElement
, false otherwise.True to allow a vertex to be created interactively, false otherwise.True to allow vertices to be selected interactively, false otherwise.True to require aGeometryEditorElement
to first be selected before it can be moved by interactively dragging, false otherwise.Determines how a geometry can be interactively scaled (resized) to fill its allocated space while using theGeometryEditor
. -
Constructor Summary
ConstructorDescriptionCreates an InteractionConfiguration that enables selection, transformation and deletion. -
Method Summary
Modifier and TypeMethodDescriptionTrue if the selectedGeometryEditorElement
can be interactively deleted, false otherwise.True if the entire geometry can be interactively selected, false otherwise.True if a mid-vertex of a polygon or polyline can be interactively selected, false otherwise.True if the selectedGeometryEditorElement
can be interactively moved, false otherwise.True if you can interactively create a new part in a polyline or polygon, false otherwise.True to allow you to interactively rotate the selectedGeometryEditorElement
, false otherwise.True to allow you to interactively scale the selectedGeometryEditorElement
, false otherwise.True to allow a vertex to be created interactively, false otherwise.True to allow vertices to be selected interactively, false otherwise.Gets the value of thescaleMode
property.boolean
Gets the value of theallowDeletingSelectedElement
property.boolean
Gets the value of theallowGeometrySelection
property.boolean
Gets the value of theallowMidVertexSelection
property.boolean
Gets the value of theallowMovingSelectedElement
property.boolean
Gets the value of theallowPartCreation
property.boolean
Gets the value of theallowPartSelection
property.boolean
Gets the value of theallowRotatingSelectedElement
property.boolean
Gets the value of theallowScalingSelectedElement
property.boolean
Gets the value of theallowVertexCreation
property.boolean
Gets the value of theallowVertexSelection
property.boolean
Gets the value of therequireSelectionBeforeMove
property.True to require aGeometryEditorElement
to first be selected before it can be moved by interactively dragging, false otherwise.Determines how a geometry can be interactively scaled (resized) to fill its allocated space while using theGeometryEditor
.void
setAllowCreation
(boolean allowCreation) Set true to enable creation, or false to disable creation.void
setAllowDeletingSelectedElement
(boolean allowDeletingSelectedElement) Sets the value of theallowDeletingSelectedElement
property.void
setAllowDeletion
(boolean allowDeletion) Set true to enable deletion, or false to disable deletion.void
setAllowGeometrySelection
(boolean allowGeometrySelection) Sets the value of theallowGeometrySelection
property.void
setAllowMidVertexSelection
(boolean allowMidVertexSelection) Sets the value of theallowMidVertexSelection
property.void
setAllowMovingSelectedElement
(boolean allowMovingSelectedElement) Sets the value of theallowMovingSelectedElement
property.void
setAllowPartCreation
(boolean allowPartCreation) Sets the value of theallowPartCreation
property.void
setAllowPartSelection
(boolean allowPartSelection) Sets the value of theallowPartSelection
property.void
setAllowRotatingSelectedElement
(boolean allowRotatingSelectedElement) Sets the value of theallowRotatingSelectedElement
property.void
setAllowScalingSelectedElement
(boolean allowScalingSelectedElement) Sets the value of theallowScalingSelectedElement
property.void
setAllowSelection
(boolean allowSelection) Set true to enable selection, or false to disable selection.void
setAllowTransformation
(boolean allowTransformation) Set true to enable interactions that transform theGeometryEditor.geometryProperty()
, for exampleallowMovingSelectedElementProperty()
.void
setAllowVertexCreation
(boolean allowVertexCreation) Sets the value of theallowVertexCreation
property.void
setAllowVertexSelection
(boolean allowVertexSelection) Sets the value of theallowVertexSelection
property.void
setRequireSelectionBeforeMove
(boolean requireSelectionBeforeMove) Sets the value of therequireSelectionBeforeMove
property.void
setScaleMode
(GeometryEditorScaleMode scaleMode) Sets the value of thescaleMode
property.
-
Property Details
-
allowDeletingSelectedElement
True if the selectedGeometryEditorElement
can be interactively deleted, false otherwise. Default is true.Whether true or false, an element can be deleted using
GeometryEditor.deleteSelectedElement()
.If true, then the
GeometryEditorElement.canDeleteProperty()
of theselected element
is also true. If you have implemented a customization to allow users to interactively delete the selected element, then you can use this property to check if that customization should be enabled.setAllowDeletion(boolean)
sets this property.- Since:
- 200.1.0
- See Also:
-
allowGeometrySelection
True if the entire geometry can be interactively selected, false otherwise. Default is true.If true, you can tap multiple times on elements of the geometry to make the entire geometry selected.
Whether true or false, the entire geometry can be selected by
GeometryEditor.selectGeometry()
.setAllowSelection(boolean)
sets this property.- Since:
- 200.1.0
- See Also:
-
allowMidVertexSelection
True if a mid-vertex of a polygon or polyline can be interactively selected, false otherwise. Default is true.By default, mid-vertices (
GeometryEditorMidVertex
) are displayed and can be helpful in interactive workflows to provide a visual cue that new vertices can be inserted between the existing vertices of polygons and polylines. They may be most helpful for users with less editing experience.If true, and
allowVertexCreationProperty()
is also true, then you can select and drag a mid-vertex to insert a vertex into thegeometry
and immediately move it to the required position.If false, and you also do not intend to programmatically select any mid-vertices (
GeometryEditor.selectMidVertex(long, long)
) then setGeometryEditorStyle.midVertexSymbolProperty()
to null to prevent the display of unusable mid-vertices.Whether true or false, a mid-vertex can be selected by
GeometryEditor.selectMidVertex(long, long)
.setAllowSelection(boolean)
sets this property.- Since:
- 200.1.0
- See Also:
-
allowMovingSelectedElement
True if the selectedGeometryEditorElement
can be interactively moved, false otherwise. Default is true.If true, you can use a drag gesture to move the selected
GeometryEditorElement
to the required location. Create a tool to allow moving only specific types ofGeometryEditorElement
by also allowing or disallowing the selection of different types of element (allowVertexSelectionProperty()
for example).If false, the behavior of a drag gesture depends on the current value of
GeometryEditor.toolProperty()
. AVertexTool
will pan the map, whereas aFreehandTool
will create a new part (depending onallowPartCreationProperty()
).If true, and the selected element is a
GeometryEditorPart
or aGeometryEditorGeometry
with a geometry type ofGeometryType.POLYLINE
orGeometryType.POLYGON
, then a bounding box is drawn using theGeometryEditorStyle.boundingBoxSymbolProperty()
.setAllowTransformation(boolean)
sets this property.- Since:
- 200.1.0
- See Also:
-
allowPartCreation
True if you can interactively create a new part in a polyline or polygon, false otherwise. Default is true.If true and the
GeometryType
of theGeometryEditor.geometryProperty()
is a polygon or polyline, you can add new parts to theMultipart
geometry - thetool
determines the interaction required to add the new part. If theGeometryType
of thegeometry
is a point or multipoint, this property is ignored. For new geometry creation (usingGeometryEditor.start(GeometryType)
, or callingGeometryEditor.start(Geometry)
with an empty geometry), this property is always ignored when adding the first part, and respected thereafter.Users less experienced with GIS data may not understand how visually separate parts of polygons and polylines form a single geometry. You may wish to prevent such users from inadvertently creating geometries with multiple parts in order to keep their workflows straightforward and understandable. Alternatively, your app may be editing data which does not support multipart geometries.
setAllowCreation(boolean)
sets this property.- Since:
- 200.1.0
- See Also:
-
allowPartSelection
True to allow a part of aMultipart
geometry (Polyline
orPolygon
) to be selected interactively, false otherwise. Default is true.If true, you can tap on the edge of a polygon or polyline
GeometryEditorGeometry
in order to the select the part.Whether true or false, a part can be selected by
GeometryEditor.selectPart(long)
. Parts are also selected after creation using aFreehandTool
.setAllowSelection(boolean)
sets this property.- Since:
- 200.1.0
- See Also:
-
allowRotatingSelectedElement
True to allow you to interactively rotate the selectedGeometryEditorElement
, false otherwise. Default is true.This property applies when the
GeometryEditor.selectedElementProperty()
is:- a
GeometryEditorGeometry
whenGeometryEditor.geometryProperty()
is aGeometryType.POLYGON
, aGeometryType.POLYLINE
, or aGeometryType.MULTIPOINT
- a
GeometryEditorPart
GeometryEditorVertex
because a zero-dimensional geometry cannot be rotated.When this property is true, and the
GeometryEditor.selectedElementProperty()
is rotatable, then a control handle is displayed (seeGeometryEditorStyle.rotateHandleSymbolProperty()
) that allows the selected element to be interactively rotated. The bounding box of the selected element is also displayed (GeometryEditorStyle.boundingBoxSymbolProperty()
).Interactive rotation changes the position of the selected element according to the movement of the rotation handle using the center of the extent of the selected element as the center of rotation (origin). Use
GeometryEditor.rotateSelectedElement(double, Point)
to rotate the selected element around a given origin.setAllowTransformation(boolean)
sets this property.- Since:
- 200.2.0
- See Also:
- a
-
allowScalingSelectedElement
True to allow you to interactively scale the selectedGeometryEditorElement
, false otherwise. Default is true.This property applies when the
GeometryEditor.selectedElementProperty()
is:- a
GeometryEditorGeometry
whenGeometryEditor.geometryProperty()
is aGeometryType.POLYGON
, aGeometryType.POLYLINE
, or aGeometryType.MULTIPOINT
- a
GeometryEditorPart
GeometryEditorVertex
because a zero-dimensional geometry cannot be scaled.When this property is true, and the
GeometryEditor.selectedElementProperty()
is scalable, then control handles are displayed (seeGeometryEditorStyle.boundingBoxHandleSymbolProperty()
) that allow the selected element to be interactively scaled. The bounding box of the selected element is also displayed (GeometryEditorStyle.boundingBoxSymbolProperty()
).Interactive scaling changes the extent of the selected element according to the movement of the scale handle being moved - the opposite handle is used as the origin of the scale transformation. Use
GeometryEditor.scaleSelectedElement(double, double, Point)
to scale the selected element relative to a given origin.setAllowTransformation(boolean)
sets this property.- Since:
- 200.2.0
- See Also:
- a
-
allowVertexCreation
True to allow a vertex to be created interactively, false otherwise. Default is true.If true, you can tap on the map to add a new vertex. The vertex is inserted after the previously selected vertex, or as the first vertex if the previous selection was the first vertex in a
Polyline
. If you tap on an existingGeometryEditorElement
then selection occurs instead.A
FreehandTool
ignores this property as it does not create individual vertices; instead you use a freehand gesture to create a part in a polygon or polyline geometry.Whether true or false, a vertex can be created by
GeometryEditor.insertVertex(Point)
.setAllowCreation(boolean)
sets this property.- Since:
- 200.1.0
- See Also:
-
allowVertexSelection
True to allow vertices to be selected interactively, false otherwise. Default is true.If true, you can tap on a vertex to select it.
To prevent vertices from being selected interactively by tapping on the vertex, while still allowing programmatic selection, set the value of the
allowVertexSelectionProperty()
to false.Whether true or false, a vertex may still become selected in other ways, for example by a call to
GeometryEditor.selectVertex(long, long)
, or when a new vertex is created.setAllowSelection(boolean)
sets this property.- Since:
- 200.1.0
- See Also:
-
requireSelectionBeforeMove
True to require aGeometryEditorElement
to first be selected before it can be moved by interactively dragging, false otherwise. Default is false.By default, you can select and immediately move an element in one gesture. Some users may find this can lead to an increase in accidental element moves when editing. By setting this to true, this can reduce the possibility of accidental moves. Alternatively, you may wish to provide access to
GeometryEditor.undo()
andGeometryEditor.redo()
to provide easy correction of accidental edits.If false, the behavior of a drag gesture depends on the current
tool
. For aVertexTool
, a drag gesture on the map over a geometry editor element that is not already selected pans the map, whereas aFreehandTool
will create a new part (depending onallowPartCreationProperty()
).This property applies if and only if
allowMovingSelectedElementProperty()
is true.- Since:
- 200.1.0
- See Also:
-
scaleMode
Determines how a geometry can be interactively scaled (resized) to fill its allocated space while using theGeometryEditor
.This property is ignored during geometry editing if
allowScalingSelectedElementProperty()
is false. It will be used to define how geometries are initially created by a drag interaction when the active tool is aShapeTool
regardless of the value ofInteractionConfiguration.allowScalingSelectedElementProperty()
.The scale control handles displayed to the user differ according to the value of this property.
Attempting to set the value to null will throw a NullPointerException exception.
- Since:
- 200.2.0
- See Also:
-
-
Constructor Details
-
InteractionConfiguration
public InteractionConfiguration()Creates an InteractionConfiguration that enables selection, transformation and deletion.Defines the most powerful and least restrictive interactive experience. When you create a new
GeometryEditorTool
, its InteractionConfiguration property defines the values appropriate for that type of tool, which may differ from the default values set by this constructor. For more information on the different default values for these tools, seeVertexTool
,FreehandTool
, andShapeTool
.- Since:
- 200.1.0
- See Also:
-
-
Method Details
-
allowDeletingSelectedElementProperty
True if the selectedGeometryEditorElement
can be interactively deleted, false otherwise. Default is true.Whether true or false, an element can be deleted using
GeometryEditor.deleteSelectedElement()
.If true, then the
GeometryEditorElement.canDeleteProperty()
of theselected element
is also true. If you have implemented a customization to allow users to interactively delete the selected element, then you can use this property to check if that customization should be enabled.setAllowDeletion(boolean)
sets this property.- Returns:
- the
allowDeletingSelectedElement
property - Since:
- 200.1.0
- See Also:
-
isAllowDeletingSelectedElement
public boolean isAllowDeletingSelectedElement()Gets the value of theallowDeletingSelectedElement
property.- Property description:
- True if the selected
GeometryEditorElement
can be interactively deleted, false otherwise. Default is true.Whether true or false, an element can be deleted using
GeometryEditor.deleteSelectedElement()
.If true, then the
GeometryEditorElement.canDeleteProperty()
of theselected element
is also true. If you have implemented a customization to allow users to interactively delete the selected element, then you can use this property to check if that customization should be enabled.setAllowDeletion(boolean)
sets this property. - Returns:
- the value of the
allowDeletingSelectedElement
property - Since:
- 200.1.0
- See Also:
-
setAllowDeletingSelectedElement
public void setAllowDeletingSelectedElement(boolean allowDeletingSelectedElement) Sets the value of theallowDeletingSelectedElement
property.- Property description:
- True if the selected
GeometryEditorElement
can be interactively deleted, false otherwise. Default is true.Whether true or false, an element can be deleted using
GeometryEditor.deleteSelectedElement()
.If true, then the
GeometryEditorElement.canDeleteProperty()
of theselected element
is also true. If you have implemented a customization to allow users to interactively delete the selected element, then you can use this property to check if that customization should be enabled.setAllowDeletion(boolean)
sets this property. - Parameters:
allowDeletingSelectedElement
- the value for theallowDeletingSelectedElement
property- Since:
- 200.1.0
- See Also:
-
allowGeometrySelectionProperty
True if the entire geometry can be interactively selected, false otherwise. Default is true.If true, you can tap multiple times on elements of the geometry to make the entire geometry selected.
Whether true or false, the entire geometry can be selected by
GeometryEditor.selectGeometry()
.setAllowSelection(boolean)
sets this property.- Returns:
- the
allowGeometrySelection
property - Since:
- 200.1.0
- See Also:
-
isAllowGeometrySelection
public boolean isAllowGeometrySelection()Gets the value of theallowGeometrySelection
property.- Property description:
- True if the entire geometry can be interactively selected, false otherwise. Default is true.
If true, you can tap multiple times on elements of the geometry to make the entire geometry selected.
Whether true or false, the entire geometry can be selected by
GeometryEditor.selectGeometry()
.setAllowSelection(boolean)
sets this property. - Returns:
- the value of the
allowGeometrySelection
property - Since:
- 200.1.0
- See Also:
-
setAllowGeometrySelection
public void setAllowGeometrySelection(boolean allowGeometrySelection) Sets the value of theallowGeometrySelection
property.- Property description:
- True if the entire geometry can be interactively selected, false otherwise. Default is true.
If true, you can tap multiple times on elements of the geometry to make the entire geometry selected.
Whether true or false, the entire geometry can be selected by
GeometryEditor.selectGeometry()
.setAllowSelection(boolean)
sets this property. - Parameters:
allowGeometrySelection
- the value for theallowGeometrySelection
property- Since:
- 200.1.0
- See Also:
-
allowMidVertexSelectionProperty
True if a mid-vertex of a polygon or polyline can be interactively selected, false otherwise. Default is true.By default, mid-vertices (
GeometryEditorMidVertex
) are displayed and can be helpful in interactive workflows to provide a visual cue that new vertices can be inserted between the existing vertices of polygons and polylines. They may be most helpful for users with less editing experience.If true, and
allowVertexCreationProperty()
is also true, then you can select and drag a mid-vertex to insert a vertex into thegeometry
and immediately move it to the required position.If false, and you also do not intend to programmatically select any mid-vertices (
GeometryEditor.selectMidVertex(long, long)
) then setGeometryEditorStyle.midVertexSymbolProperty()
to null to prevent the display of unusable mid-vertices.Whether true or false, a mid-vertex can be selected by
GeometryEditor.selectMidVertex(long, long)
.setAllowSelection(boolean)
sets this property.- Returns:
- the
allowMidVertexSelection
property - Since:
- 200.1.0
- See Also:
-
isAllowMidVertexSelection
public boolean isAllowMidVertexSelection()Gets the value of theallowMidVertexSelection
property.- Property description:
- True if a mid-vertex of a polygon or polyline can be interactively selected, false otherwise. Default is true.
By default, mid-vertices (
GeometryEditorMidVertex
) are displayed and can be helpful in interactive workflows to provide a visual cue that new vertices can be inserted between the existing vertices of polygons and polylines. They may be most helpful for users with less editing experience.If true, and
allowVertexCreationProperty()
is also true, then you can select and drag a mid-vertex to insert a vertex into thegeometry
and immediately move it to the required position.If false, and you also do not intend to programmatically select any mid-vertices (
GeometryEditor.selectMidVertex(long, long)
) then setGeometryEditorStyle.midVertexSymbolProperty()
to null to prevent the display of unusable mid-vertices.Whether true or false, a mid-vertex can be selected by
GeometryEditor.selectMidVertex(long, long)
.setAllowSelection(boolean)
sets this property. - Returns:
- the value of the
allowMidVertexSelection
property - Since:
- 200.1.0
- See Also:
-
setAllowMidVertexSelection
public void setAllowMidVertexSelection(boolean allowMidVertexSelection) Sets the value of theallowMidVertexSelection
property.- Property description:
- True if a mid-vertex of a polygon or polyline can be interactively selected, false otherwise. Default is true.
By default, mid-vertices (
GeometryEditorMidVertex
) are displayed and can be helpful in interactive workflows to provide a visual cue that new vertices can be inserted between the existing vertices of polygons and polylines. They may be most helpful for users with less editing experience.If true, and
allowVertexCreationProperty()
is also true, then you can select and drag a mid-vertex to insert a vertex into thegeometry
and immediately move it to the required position.If false, and you also do not intend to programmatically select any mid-vertices (
GeometryEditor.selectMidVertex(long, long)
) then setGeometryEditorStyle.midVertexSymbolProperty()
to null to prevent the display of unusable mid-vertices.Whether true or false, a mid-vertex can be selected by
GeometryEditor.selectMidVertex(long, long)
.setAllowSelection(boolean)
sets this property. - Parameters:
allowMidVertexSelection
- the value for theallowMidVertexSelection
property- Since:
- 200.1.0
- See Also:
-
allowMovingSelectedElementProperty
True if the selectedGeometryEditorElement
can be interactively moved, false otherwise. Default is true.If true, you can use a drag gesture to move the selected
GeometryEditorElement
to the required location. Create a tool to allow moving only specific types ofGeometryEditorElement
by also allowing or disallowing the selection of different types of element (allowVertexSelectionProperty()
for example).If false, the behavior of a drag gesture depends on the current value of
GeometryEditor.toolProperty()
. AVertexTool
will pan the map, whereas aFreehandTool
will create a new part (depending onallowPartCreationProperty()
).If true, and the selected element is a
GeometryEditorPart
or aGeometryEditorGeometry
with a geometry type ofGeometryType.POLYLINE
orGeometryType.POLYGON
, then a bounding box is drawn using theGeometryEditorStyle.boundingBoxSymbolProperty()
.setAllowTransformation(boolean)
sets this property.- Returns:
- the
allowMovingSelectedElement
property - Since:
- 200.1.0
- See Also:
-
isAllowMovingSelectedElement
public boolean isAllowMovingSelectedElement()Gets the value of theallowMovingSelectedElement
property.- Property description:
- True if the selected
GeometryEditorElement
can be interactively moved, false otherwise. Default is true.If true, you can use a drag gesture to move the selected
GeometryEditorElement
to the required location. Create a tool to allow moving only specific types ofGeometryEditorElement
by also allowing or disallowing the selection of different types of element (allowVertexSelectionProperty()
for example).If false, the behavior of a drag gesture depends on the current value of
GeometryEditor.toolProperty()
. AVertexTool
will pan the map, whereas aFreehandTool
will create a new part (depending onallowPartCreationProperty()
).If true, and the selected element is a
GeometryEditorPart
or aGeometryEditorGeometry
with a geometry type ofGeometryType.POLYLINE
orGeometryType.POLYGON
, then a bounding box is drawn using theGeometryEditorStyle.boundingBoxSymbolProperty()
.setAllowTransformation(boolean)
sets this property. - Returns:
- the value of the
allowMovingSelectedElement
property - Since:
- 200.1.0
- See Also:
-
setAllowMovingSelectedElement
public void setAllowMovingSelectedElement(boolean allowMovingSelectedElement) Sets the value of theallowMovingSelectedElement
property.- Property description:
- True if the selected
GeometryEditorElement
can be interactively moved, false otherwise. Default is true.If true, you can use a drag gesture to move the selected
GeometryEditorElement
to the required location. Create a tool to allow moving only specific types ofGeometryEditorElement
by also allowing or disallowing the selection of different types of element (allowVertexSelectionProperty()
for example).If false, the behavior of a drag gesture depends on the current value of
GeometryEditor.toolProperty()
. AVertexTool
will pan the map, whereas aFreehandTool
will create a new part (depending onallowPartCreationProperty()
).If true, and the selected element is a
GeometryEditorPart
or aGeometryEditorGeometry
with a geometry type ofGeometryType.POLYLINE
orGeometryType.POLYGON
, then a bounding box is drawn using theGeometryEditorStyle.boundingBoxSymbolProperty()
.setAllowTransformation(boolean)
sets this property. - Parameters:
allowMovingSelectedElement
- the value for theallowMovingSelectedElement
property- Since:
- 200.1.0
- See Also:
-
allowPartCreationProperty
True if you can interactively create a new part in a polyline or polygon, false otherwise. Default is true.If true and the
GeometryType
of theGeometryEditor.geometryProperty()
is a polygon or polyline, you can add new parts to theMultipart
geometry - thetool
determines the interaction required to add the new part. If theGeometryType
of thegeometry
is a point or multipoint, this property is ignored. For new geometry creation (usingGeometryEditor.start(GeometryType)
, or callingGeometryEditor.start(Geometry)
with an empty geometry), this property is always ignored when adding the first part, and respected thereafter.Users less experienced with GIS data may not understand how visually separate parts of polygons and polylines form a single geometry. You may wish to prevent such users from inadvertently creating geometries with multiple parts in order to keep their workflows straightforward and understandable. Alternatively, your app may be editing data which does not support multipart geometries.
setAllowCreation(boolean)
sets this property.- Returns:
- the
allowPartCreation
property - Since:
- 200.1.0
- See Also:
-
isAllowPartCreation
public boolean isAllowPartCreation()Gets the value of theallowPartCreation
property.- Property description:
- True if you can interactively create a new part in a polyline or polygon, false otherwise. Default is true.
If true and the
GeometryType
of theGeometryEditor.geometryProperty()
is a polygon or polyline, you can add new parts to theMultipart
geometry - thetool
determines the interaction required to add the new part. If theGeometryType
of thegeometry
is a point or multipoint, this property is ignored. For new geometry creation (usingGeometryEditor.start(GeometryType)
, or callingGeometryEditor.start(Geometry)
with an empty geometry), this property is always ignored when adding the first part, and respected thereafter.Users less experienced with GIS data may not understand how visually separate parts of polygons and polylines form a single geometry. You may wish to prevent such users from inadvertently creating geometries with multiple parts in order to keep their workflows straightforward and understandable. Alternatively, your app may be editing data which does not support multipart geometries.
setAllowCreation(boolean)
sets this property. - Returns:
- the value of the
allowPartCreation
property - Since:
- 200.1.0
- See Also:
-
setAllowPartCreation
public void setAllowPartCreation(boolean allowPartCreation) Sets the value of theallowPartCreation
property.- Property description:
- True if you can interactively create a new part in a polyline or polygon, false otherwise. Default is true.
If true and the
GeometryType
of theGeometryEditor.geometryProperty()
is a polygon or polyline, you can add new parts to theMultipart
geometry - thetool
determines the interaction required to add the new part. If theGeometryType
of thegeometry
is a point or multipoint, this property is ignored. For new geometry creation (usingGeometryEditor.start(GeometryType)
, or callingGeometryEditor.start(Geometry)
with an empty geometry), this property is always ignored when adding the first part, and respected thereafter.Users less experienced with GIS data may not understand how visually separate parts of polygons and polylines form a single geometry. You may wish to prevent such users from inadvertently creating geometries with multiple parts in order to keep their workflows straightforward and understandable. Alternatively, your app may be editing data which does not support multipart geometries.
setAllowCreation(boolean)
sets this property. - Parameters:
allowPartCreation
- the value for theallowPartCreation
property- Since:
- 200.1.0
- See Also:
-
allowPartSelectionProperty
True to allow a part of aMultipart
geometry (Polyline
orPolygon
) to be selected interactively, false otherwise. Default is true.If true, you can tap on the edge of a polygon or polyline
GeometryEditorGeometry
in order to the select the part.Whether true or false, a part can be selected by
GeometryEditor.selectPart(long)
. Parts are also selected after creation using aFreehandTool
.setAllowSelection(boolean)
sets this property.- Returns:
- the
allowPartSelection
property - Since:
- 200.1.0
- See Also:
-
isAllowPartSelection
public boolean isAllowPartSelection()Gets the value of theallowPartSelection
property.- Property description:
- True to allow a part of a
Multipart
geometry (Polyline
orPolygon
) to be selected interactively, false otherwise. Default is true.If true, you can tap on the edge of a polygon or polyline
GeometryEditorGeometry
in order to the select the part.Whether true or false, a part can be selected by
GeometryEditor.selectPart(long)
. Parts are also selected after creation using aFreehandTool
.setAllowSelection(boolean)
sets this property. - Returns:
- the value of the
allowPartSelection
property - Since:
- 200.1.0
- See Also:
-
setAllowPartSelection
public void setAllowPartSelection(boolean allowPartSelection) Sets the value of theallowPartSelection
property.- Property description:
- True to allow a part of a
Multipart
geometry (Polyline
orPolygon
) to be selected interactively, false otherwise. Default is true.If true, you can tap on the edge of a polygon or polyline
GeometryEditorGeometry
in order to the select the part.Whether true or false, a part can be selected by
GeometryEditor.selectPart(long)
. Parts are also selected after creation using aFreehandTool
.setAllowSelection(boolean)
sets this property. - Parameters:
allowPartSelection
- the value for theallowPartSelection
property- Since:
- 200.1.0
- See Also:
-
allowRotatingSelectedElementProperty
True to allow you to interactively rotate the selectedGeometryEditorElement
, false otherwise. Default is true.This property applies when the
GeometryEditor.selectedElementProperty()
is:- a
GeometryEditorGeometry
whenGeometryEditor.geometryProperty()
is aGeometryType.POLYGON
, aGeometryType.POLYLINE
, or aGeometryType.MULTIPOINT
- a
GeometryEditorPart
GeometryEditorVertex
because a zero-dimensional geometry cannot be rotated.When this property is true, and the
GeometryEditor.selectedElementProperty()
is rotatable, then a control handle is displayed (seeGeometryEditorStyle.rotateHandleSymbolProperty()
) that allows the selected element to be interactively rotated. The bounding box of the selected element is also displayed (GeometryEditorStyle.boundingBoxSymbolProperty()
).Interactive rotation changes the position of the selected element according to the movement of the rotation handle using the center of the extent of the selected element as the center of rotation (origin). Use
GeometryEditor.rotateSelectedElement(double, Point)
to rotate the selected element around a given origin.setAllowTransformation(boolean)
sets this property.- Returns:
- the
allowRotatingSelectedElement
property - Since:
- 200.2.0
- See Also:
- a
-
isAllowRotatingSelectedElement
public boolean isAllowRotatingSelectedElement()Gets the value of theallowRotatingSelectedElement
property.- Property description:
- True to allow you to interactively rotate the selected
GeometryEditorElement
, false otherwise. Default is true.This property applies when the
GeometryEditor.selectedElementProperty()
is:- a
GeometryEditorGeometry
whenGeometryEditor.geometryProperty()
is aGeometryType.POLYGON
, aGeometryType.POLYLINE
, or aGeometryType.MULTIPOINT
- a
GeometryEditorPart
GeometryEditorVertex
because a zero-dimensional geometry cannot be rotated.When this property is true, and the
GeometryEditor.selectedElementProperty()
is rotatable, then a control handle is displayed (seeGeometryEditorStyle.rotateHandleSymbolProperty()
) that allows the selected element to be interactively rotated. The bounding box of the selected element is also displayed (GeometryEditorStyle.boundingBoxSymbolProperty()
).Interactive rotation changes the position of the selected element according to the movement of the rotation handle using the center of the extent of the selected element as the center of rotation (origin). Use
GeometryEditor.rotateSelectedElement(double, Point)
to rotate the selected element around a given origin.setAllowTransformation(boolean)
sets this property. - a
- Returns:
- the value of the
allowRotatingSelectedElement
property - Since:
- 200.2.0
- See Also:
-
setAllowRotatingSelectedElement
public void setAllowRotatingSelectedElement(boolean allowRotatingSelectedElement) Sets the value of theallowRotatingSelectedElement
property.- Property description:
- True to allow you to interactively rotate the selected
GeometryEditorElement
, false otherwise. Default is true.This property applies when the
GeometryEditor.selectedElementProperty()
is:- a
GeometryEditorGeometry
whenGeometryEditor.geometryProperty()
is aGeometryType.POLYGON
, aGeometryType.POLYLINE
, or aGeometryType.MULTIPOINT
- a
GeometryEditorPart
GeometryEditorVertex
because a zero-dimensional geometry cannot be rotated.When this property is true, and the
GeometryEditor.selectedElementProperty()
is rotatable, then a control handle is displayed (seeGeometryEditorStyle.rotateHandleSymbolProperty()
) that allows the selected element to be interactively rotated. The bounding box of the selected element is also displayed (GeometryEditorStyle.boundingBoxSymbolProperty()
).Interactive rotation changes the position of the selected element according to the movement of the rotation handle using the center of the extent of the selected element as the center of rotation (origin). Use
GeometryEditor.rotateSelectedElement(double, Point)
to rotate the selected element around a given origin.setAllowTransformation(boolean)
sets this property. - a
- Parameters:
allowRotatingSelectedElement
- the value for theallowRotatingSelectedElement
property- Since:
- 200.2.0
- See Also:
-
allowScalingSelectedElementProperty
True to allow you to interactively scale the selectedGeometryEditorElement
, false otherwise. Default is true.This property applies when the
GeometryEditor.selectedElementProperty()
is:- a
GeometryEditorGeometry
whenGeometryEditor.geometryProperty()
is aGeometryType.POLYGON
, aGeometryType.POLYLINE
, or aGeometryType.MULTIPOINT
- a
GeometryEditorPart
GeometryEditorVertex
because a zero-dimensional geometry cannot be scaled.When this property is true, and the
GeometryEditor.selectedElementProperty()
is scalable, then control handles are displayed (seeGeometryEditorStyle.boundingBoxHandleSymbolProperty()
) that allow the selected element to be interactively scaled. The bounding box of the selected element is also displayed (GeometryEditorStyle.boundingBoxSymbolProperty()
).Interactive scaling changes the extent of the selected element according to the movement of the scale handle being moved - the opposite handle is used as the origin of the scale transformation. Use
GeometryEditor.scaleSelectedElement(double, double, Point)
to scale the selected element relative to a given origin.setAllowTransformation(boolean)
sets this property.- Returns:
- the
allowScalingSelectedElement
property - Since:
- 200.2.0
- See Also:
- a
-
isAllowScalingSelectedElement
public boolean isAllowScalingSelectedElement()Gets the value of theallowScalingSelectedElement
property.- Property description:
- True to allow you to interactively scale the selected
GeometryEditorElement
, false otherwise. Default is true.This property applies when the
GeometryEditor.selectedElementProperty()
is:- a
GeometryEditorGeometry
whenGeometryEditor.geometryProperty()
is aGeometryType.POLYGON
, aGeometryType.POLYLINE
, or aGeometryType.MULTIPOINT
- a
GeometryEditorPart
GeometryEditorVertex
because a zero-dimensional geometry cannot be scaled.When this property is true, and the
GeometryEditor.selectedElementProperty()
is scalable, then control handles are displayed (seeGeometryEditorStyle.boundingBoxHandleSymbolProperty()
) that allow the selected element to be interactively scaled. The bounding box of the selected element is also displayed (GeometryEditorStyle.boundingBoxSymbolProperty()
).Interactive scaling changes the extent of the selected element according to the movement of the scale handle being moved - the opposite handle is used as the origin of the scale transformation. Use
GeometryEditor.scaleSelectedElement(double, double, Point)
to scale the selected element relative to a given origin.setAllowTransformation(boolean)
sets this property. - a
- Returns:
- the value of the
allowScalingSelectedElement
property - Since:
- 200.2.0
- See Also:
-
setAllowScalingSelectedElement
public void setAllowScalingSelectedElement(boolean allowScalingSelectedElement) Sets the value of theallowScalingSelectedElement
property.- Property description:
- True to allow you to interactively scale the selected
GeometryEditorElement
, false otherwise. Default is true.This property applies when the
GeometryEditor.selectedElementProperty()
is:- a
GeometryEditorGeometry
whenGeometryEditor.geometryProperty()
is aGeometryType.POLYGON
, aGeometryType.POLYLINE
, or aGeometryType.MULTIPOINT
- a
GeometryEditorPart
GeometryEditorVertex
because a zero-dimensional geometry cannot be scaled.When this property is true, and the
GeometryEditor.selectedElementProperty()
is scalable, then control handles are displayed (seeGeometryEditorStyle.boundingBoxHandleSymbolProperty()
) that allow the selected element to be interactively scaled. The bounding box of the selected element is also displayed (GeometryEditorStyle.boundingBoxSymbolProperty()
).Interactive scaling changes the extent of the selected element according to the movement of the scale handle being moved - the opposite handle is used as the origin of the scale transformation. Use
GeometryEditor.scaleSelectedElement(double, double, Point)
to scale the selected element relative to a given origin.setAllowTransformation(boolean)
sets this property. - a
- Parameters:
allowScalingSelectedElement
- the value for theallowScalingSelectedElement
property- Since:
- 200.2.0
- See Also:
-
allowVertexCreationProperty
True to allow a vertex to be created interactively, false otherwise. Default is true.If true, you can tap on the map to add a new vertex. The vertex is inserted after the previously selected vertex, or as the first vertex if the previous selection was the first vertex in a
Polyline
. If you tap on an existingGeometryEditorElement
then selection occurs instead.A
FreehandTool
ignores this property as it does not create individual vertices; instead you use a freehand gesture to create a part in a polygon or polyline geometry.Whether true or false, a vertex can be created by
GeometryEditor.insertVertex(Point)
.setAllowCreation(boolean)
sets this property.- Returns:
- the
allowVertexCreation
property - Since:
- 200.1.0
- See Also:
-
isAllowVertexCreation
public boolean isAllowVertexCreation()Gets the value of theallowVertexCreation
property.- Property description:
- True to allow a vertex to be created interactively, false otherwise. Default is true.
If true, you can tap on the map to add a new vertex. The vertex is inserted after the previously selected vertex, or as the first vertex if the previous selection was the first vertex in a
Polyline
. If you tap on an existingGeometryEditorElement
then selection occurs instead.A
FreehandTool
ignores this property as it does not create individual vertices; instead you use a freehand gesture to create a part in a polygon or polyline geometry.Whether true or false, a vertex can be created by
GeometryEditor.insertVertex(Point)
.setAllowCreation(boolean)
sets this property. - Returns:
- the value of the
allowVertexCreation
property - Since:
- 200.1.0
- See Also:
-
setAllowVertexCreation
public void setAllowVertexCreation(boolean allowVertexCreation) Sets the value of theallowVertexCreation
property.- Property description:
- True to allow a vertex to be created interactively, false otherwise. Default is true.
If true, you can tap on the map to add a new vertex. The vertex is inserted after the previously selected vertex, or as the first vertex if the previous selection was the first vertex in a
Polyline
. If you tap on an existingGeometryEditorElement
then selection occurs instead.A
FreehandTool
ignores this property as it does not create individual vertices; instead you use a freehand gesture to create a part in a polygon or polyline geometry.Whether true or false, a vertex can be created by
GeometryEditor.insertVertex(Point)
.setAllowCreation(boolean)
sets this property. - Parameters:
allowVertexCreation
- the value for theallowVertexCreation
property- Since:
- 200.1.0
- See Also:
-
allowVertexSelectionProperty
True to allow vertices to be selected interactively, false otherwise. Default is true.If true, you can tap on a vertex to select it.
To prevent vertices from being selected interactively by tapping on the vertex, while still allowing programmatic selection, set the value of the
allowVertexSelectionProperty()
to false.Whether true or false, a vertex may still become selected in other ways, for example by a call to
GeometryEditor.selectVertex(long, long)
, or when a new vertex is created.setAllowSelection(boolean)
sets this property.- Returns:
- the
allowVertexSelection
property - Since:
- 200.1.0
- See Also:
-
isAllowVertexSelection
public boolean isAllowVertexSelection()Gets the value of theallowVertexSelection
property.- Property description:
- True to allow vertices to be selected interactively, false otherwise. Default is true.
If true, you can tap on a vertex to select it.
To prevent vertices from being selected interactively by tapping on the vertex, while still allowing programmatic selection, set the value of the
allowVertexSelectionProperty()
to false.Whether true or false, a vertex may still become selected in other ways, for example by a call to
GeometryEditor.selectVertex(long, long)
, or when a new vertex is created.setAllowSelection(boolean)
sets this property. - Returns:
- the value of the
allowVertexSelection
property - Since:
- 200.1.0
- See Also:
-
setAllowVertexSelection
public void setAllowVertexSelection(boolean allowVertexSelection) Sets the value of theallowVertexSelection
property.- Property description:
- True to allow vertices to be selected interactively, false otherwise. Default is true.
If true, you can tap on a vertex to select it.
To prevent vertices from being selected interactively by tapping on the vertex, while still allowing programmatic selection, set the value of the
allowVertexSelectionProperty()
to false.Whether true or false, a vertex may still become selected in other ways, for example by a call to
GeometryEditor.selectVertex(long, long)
, or when a new vertex is created.setAllowSelection(boolean)
sets this property. - Parameters:
allowVertexSelection
- the value for theallowVertexSelection
property- Since:
- 200.1.0
- See Also:
-
requireSelectionBeforeMoveProperty
True to require aGeometryEditorElement
to first be selected before it can be moved by interactively dragging, false otherwise. Default is false.By default, you can select and immediately move an element in one gesture. Some users may find this can lead to an increase in accidental element moves when editing. By setting this to true, this can reduce the possibility of accidental moves. Alternatively, you may wish to provide access to
GeometryEditor.undo()
andGeometryEditor.redo()
to provide easy correction of accidental edits.If false, the behavior of a drag gesture depends on the current
tool
. For aVertexTool
, a drag gesture on the map over a geometry editor element that is not already selected pans the map, whereas aFreehandTool
will create a new part (depending onallowPartCreationProperty()
).This property applies if and only if
allowMovingSelectedElementProperty()
is true.- Returns:
- the
requireSelectionBeforeMove
property - Since:
- 200.1.0
- See Also:
-
isRequireSelectionBeforeMove
public boolean isRequireSelectionBeforeMove()Gets the value of therequireSelectionBeforeMove
property.- Property description:
- True to require a
GeometryEditorElement
to first be selected before it can be moved by interactively dragging, false otherwise. Default is false.By default, you can select and immediately move an element in one gesture. Some users may find this can lead to an increase in accidental element moves when editing. By setting this to true, this can reduce the possibility of accidental moves. Alternatively, you may wish to provide access to
GeometryEditor.undo()
andGeometryEditor.redo()
to provide easy correction of accidental edits.If false, the behavior of a drag gesture depends on the current
tool
. For aVertexTool
, a drag gesture on the map over a geometry editor element that is not already selected pans the map, whereas aFreehandTool
will create a new part (depending onallowPartCreationProperty()
).This property applies if and only if
allowMovingSelectedElementProperty()
is true. - Returns:
- the value of the
requireSelectionBeforeMove
property - Since:
- 200.1.0
- See Also:
-
setRequireSelectionBeforeMove
public void setRequireSelectionBeforeMove(boolean requireSelectionBeforeMove) Sets the value of therequireSelectionBeforeMove
property.- Property description:
- True to require a
GeometryEditorElement
to first be selected before it can be moved by interactively dragging, false otherwise. Default is false.By default, you can select and immediately move an element in one gesture. Some users may find this can lead to an increase in accidental element moves when editing. By setting this to true, this can reduce the possibility of accidental moves. Alternatively, you may wish to provide access to
GeometryEditor.undo()
andGeometryEditor.redo()
to provide easy correction of accidental edits.If false, the behavior of a drag gesture depends on the current
tool
. For aVertexTool
, a drag gesture on the map over a geometry editor element that is not already selected pans the map, whereas aFreehandTool
will create a new part (depending onallowPartCreationProperty()
).This property applies if and only if
allowMovingSelectedElementProperty()
is true. - Parameters:
requireSelectionBeforeMove
- the value for therequireSelectionBeforeMove
property- Since:
- 200.1.0
- See Also:
-
scaleModeProperty
Determines how a geometry can be interactively scaled (resized) to fill its allocated space while using theGeometryEditor
.This property is ignored during geometry editing if
allowScalingSelectedElementProperty()
is false. It will be used to define how geometries are initially created by a drag interaction when the active tool is aShapeTool
regardless of the value ofInteractionConfiguration.allowScalingSelectedElementProperty()
.The scale control handles displayed to the user differ according to the value of this property.
Attempting to set the value to null will throw a NullPointerException exception.
- Returns:
- the
scaleMode
property - Since:
- 200.2.0
- See Also:
-
getScaleMode
Gets the value of thescaleMode
property.- Property description:
- Determines how a geometry can be interactively scaled (resized) to fill its allocated space while using the
GeometryEditor
.This property is ignored during geometry editing if
allowScalingSelectedElementProperty()
is false. It will be used to define how geometries are initially created by a drag interaction when the active tool is aShapeTool
regardless of the value ofInteractionConfiguration.allowScalingSelectedElementProperty()
.The scale control handles displayed to the user differ according to the value of this property.
Attempting to set the value to null will throw a NullPointerException exception.
- Returns:
- the value of the
scaleMode
property - Since:
- 200.2.0
- See Also:
-
setScaleMode
Sets the value of thescaleMode
property.- Property description:
- Determines how a geometry can be interactively scaled (resized) to fill its allocated space while using the
GeometryEditor
.This property is ignored during geometry editing if
allowScalingSelectedElementProperty()
is false. It will be used to define how geometries are initially created by a drag interaction when the active tool is aShapeTool
regardless of the value ofInteractionConfiguration.allowScalingSelectedElementProperty()
.The scale control handles displayed to the user differ according to the value of this property.
Attempting to set the value to null will throw a NullPointerException exception.
- Parameters:
scaleMode
- the value for thescaleMode
property- Since:
- 200.2.0
- See Also:
-
setAllowCreation
public void setAllowCreation(boolean allowCreation) Set true to enable creation, or false to disable creation.Sets the following properties:
Deletion, selection and transformation properties are unaltered.- Parameters:
allowCreation
- true if creation is allowed, false otherwise.- Since:
- 200.1.0
-
setAllowDeletion
public void setAllowDeletion(boolean allowDeletion) Set true to enable deletion, or false to disable deletion.Sets the following properties:
Creation, selection and transformation properties are unaltered.- Parameters:
allowDeletion
- true if deletion is allowed, false otherwise.- Since:
- 200.1.0
-
setAllowSelection
public void setAllowSelection(boolean allowSelection) Set true to enable selection, or false to disable selection.Sets the following properties:
Creation, deletion and transformation properties are unaltered.- Parameters:
allowSelection
- true if selection is allowed, false otherwise.- Since:
- 200.1.0
-
setAllowTransformation
public void setAllowTransformation(boolean allowTransformation) Set true to enable interactions that transform theGeometryEditor.geometryProperty()
, for exampleallowMovingSelectedElementProperty()
. Set false to disable.Sets the following properties:
Creation, deletion and selection properties are unaltered.- Parameters:
allowTransformation
- true if transformation is allowed, false otherwise.- Since:
- 200.1.0
-