Class SnapSourceSettings
GeometryEditor
can snap interactive edits to.
Following a call to SnapSettings.syncSourceSettings()
, the SnapSettings.getSourceSettings()
collection
is populated with SnapSourceSettings objects that are valid for snapping. Each represents a SnapSource
that is in the currently connected map and provides full resolution geometries suitable for snapping.
Set enabledProperty()
to true for each item that you want to allow your users to snap to. You may
wish to delegate the choice of snapping sources to users by binding the collection of snapping sources to
controls which allow them to change SnapSourceSettings.enabledProperty()
for each snapping source individually.
Snapping works for visible objects within the SnapSource
- for example if a layer is not visible due to the
current scale range, definition expression, or other reason, it will not participate in snapping at that time.
Visibility does not affect whether a SnapSourceSettings object is present in the
SnapSettings.getSourceSettings()
collection or not.
See SnapSource
for more information about which data sources are valid for snapping.
- Since:
- 200.4.0
- See Also:
-
Property Summary
TypePropertyDescriptionTrue to enable snapping to the geometries in theSnapSource
, false otherwise.Underlying source of geometries to snap to, for example aFeatureLayer
. -
Method Summary
Modifier and TypeMethodDescriptionTrue to enable snapping to the geometries in theSnapSource
, false otherwise.Gets the value of thesource
property.boolean
Gets the value of theenabled
property.void
setEnabled
(boolean isEnabled) Sets the value of theenabled
property.Underlying source of geometries to snap to, for example aFeatureLayer
.
-
Property Details
-
enabled
True to enable snapping to the geometries in theSnapSource
, false otherwise. Default is false.Snapping sources can be enabled or disabled individually. If
SnapSettings.enabledProperty()
is false, this value is ignored and snapping is not enabled.- Since:
- 200.4.0
- See Also:
-
source
Underlying source of geometries to snap to, for example aFeatureLayer
.- Since:
- 200.4.0
- See Also:
-
-
Method Details
-
enabledProperty
True to enable snapping to the geometries in theSnapSource
, false otherwise. Default is false.Snapping sources can be enabled or disabled individually. If
SnapSettings.enabledProperty()
is false, this value is ignored and snapping is not enabled.- Returns:
- the
enabled
property - Since:
- 200.4.0
- See Also:
-
isEnabled
public boolean isEnabled()Gets the value of theenabled
property.- Property description:
- True to enable snapping to the geometries in the
SnapSource
, false otherwise. Default is false.Snapping sources can be enabled or disabled individually. If
SnapSettings.enabledProperty()
is false, this value is ignored and snapping is not enabled. - Returns:
- the value of the
enabled
property - Since:
- 200.4.0
- See Also:
-
setEnabled
public void setEnabled(boolean isEnabled) Sets the value of theenabled
property.- Property description:
- True to enable snapping to the geometries in the
SnapSource
, false otherwise. Default is false.Snapping sources can be enabled or disabled individually. If
SnapSettings.enabledProperty()
is false, this value is ignored and snapping is not enabled. - Parameters:
isEnabled
- the value for theenabled
property- Since:
- 200.4.0
- See Also:
-
sourceProperty
Underlying source of geometries to snap to, for example aFeatureLayer
.- Returns:
- the
source
property - Since:
- 200.4.0
- See Also:
-
getSource
Gets the value of thesource
property.- Property description:
- Underlying source of geometries to snap to, for example a
FeatureLayer
. - Returns:
- the value of the
source
property - Since:
- 200.4.0
- See Also:
-