com.esri.arcgis.controls
Class ISnappingResultProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.controls.ISnappingResultProxy
All Implemented Interfaces:
ISnappingResult, Externalizable, Serializable

public class ISnappingResultProxy
extends com.esri.arcgis.interop.Dispatch
implements ISnappingResult, 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.

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  ISnappingResultProxy()
           
  ISnappingResultProxy(Object obj)
           
protected ISnappingResultProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 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.
 void removeListener(String iidStr, Object theListener)
           
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

ISnappingResultProxy

public ISnappingResultProxy()

ISnappingResultProxy

public ISnappingResultProxy(Object obj)
                     throws IOException
Throws:
IOException

ISnappingResultProxy

protected ISnappingResultProxy(Object obj,
                               String iid)
                        throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

getLocation

public 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.

Specified by:
getLocation in interface ISnappingResult
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

public 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.

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

getDescription

public 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.

Specified by:
getDescription in interface ISnappingResult
Returns:
The desc
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.