com.esri.arcgis.controls
Interface ISnappingResult

All Superinterfaces:
Serializable
All Known Implementing Classes:
ISnappingResultProxy

public interface ISnappingResult
extends Serializable

ISnappingResult Interface

Remarks

This interface provides access to information regarding the last call to Snapping, including the location of the point location that satisfied the snap request, and information about the layer and snapping type associated with that location.


A reference to a snapping result is returned from IPointSnapper.Snap(). If not valid snap candidates were found during execution of the Snap method, a null ISnapResult is returned. As a developer you should anticipate this and utilize a null pointer check before querying information returned.

Product Availability

Available with ArcGIS Engine.


Method Summary
 String getDescription()
          Gets the description of the snap that occurred.
 IPoint getLocation()
          Gets the location that was snapped.
 int getType()
          Gets the type of snap that occurred.
 

Method Detail

getLocation

IPoint getLocation()
                   throws IOException,
                          AutomationException
Gets the location that was snapped.

Remarks

The location is the point that was satisfied during the Snap operation given the input point (usually the cursor location) and the snapping environment settings. In most cases, a tool that utilizes snapping would update the application’s current location so a user who clicks at that location would utilize the snapped point for the tool. The location always returns a valid reference to an IPoint object.

Product Availability

Available with ArcGIS Engine.

Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

int getType()
            throws IOException,
                   AutomationException
Gets the type of snap that occurred.

Remarks

The type identifies which snapping type defined in the esriSnappingType enumeration satisfied the result of a Snap call.

Product Availability

Available with ArcGIS Engine.

Returns:
A com.esri.arcgis.controls.esriSnappingType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDescription

String getDescription()
                      throws IOException,
                             AutomationException
Gets the description of the snap that occurred.

Remarks

The description contains information describing the nature of the snapping result returned. The content of the description is determined by the value of ISnappingEnvironment.SnapTipType. If the SnapTipType is set to display the layer name and snapping type, the description is returned in the following format: <layer name> : <snapping type>. If the SnapTipType is set to return no tip, the description returned is an empty string.

Product Availability

Available with ArcGIS Engine.

Returns:
The desc
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.