com.esri.arcgis.geodatabase
Class IFeatureSnapProxy

java.lang.Object
  extended bycom.esri.arcgis.interop.Dispatch
      extended bycom.esri.arcgis.geodatabase.IFeatureSnapProxy
All Implemented Interfaces:
java.io.Externalizable, IFeatureSnap, java.io.Serializable

public class IFeatureSnapProxy
extends Dispatch
implements IFeatureSnap, java.io.Serializable

Provides access to members that enable features to do custom snapping.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
Serialized Form

Field Summary
static java.lang.Class targetClass
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF
 
Constructor Summary
  IFeatureSnapProxy()
          For internal use only
  IFeatureSnapProxy(java.lang.Object obj)
           
protected IFeatureSnapProxy(java.lang.Object obj, java.lang.String iid)
           
  IFeatureSnapProxy(java.lang.String CLSID, java.lang.String host, AuthInfo authInfo)
           
protected IFeatureSnapProxy(java.lang.String CLSID, java.lang.String iid, java.lang.String host, AuthInfo authInfo)
           
 
Method Summary
 void addListener(java.lang.String iidStr, java.lang.Object theListener, java.lang.Object theSource)
          Adds a Java object to be a listener for a specific kind of event generated by the COM object.
 void removeListener(java.lang.String iidStr, java.lang.Object theListener)
          Removes a Java object as a listener to events generated by a COM object.
 boolean snap(IPoint point, double tolerance)
          Snap the feature based on the arguments.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, hashCode, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, queryInterface, readExternal, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

targetClass

public static final java.lang.Class targetClass
Constructor Detail

IFeatureSnapProxy

public IFeatureSnapProxy(java.lang.String CLSID,
                         java.lang.String host,
                         AuthInfo authInfo)
                  throws java.net.UnknownHostException,
                         java.io.IOException

IFeatureSnapProxy

public IFeatureSnapProxy()
For internal use only


IFeatureSnapProxy

public IFeatureSnapProxy(java.lang.Object obj)
                  throws java.io.IOException

IFeatureSnapProxy

protected IFeatureSnapProxy(java.lang.Object obj,
                            java.lang.String iid)
                     throws java.io.IOException

IFeatureSnapProxy

protected IFeatureSnapProxy(java.lang.String CLSID,
                            java.lang.String iid,
                            java.lang.String host,
                            AuthInfo authInfo)
                     throws java.io.IOException
Method Detail

addListener

public void addListener(java.lang.String iidStr,
                        java.lang.Object theListener,
                        java.lang.Object theSource)
                 throws java.io.IOException
Description copied from class: Dispatch
Adds a Java object to be a listener for a specific kind of event generated by the COM object. when you wish to invoke method on the COM object using IDispatch (not using custom marshalling).

Overrides:
addListener in class Dispatch
Parameters:
iidStr - the ID of the outgoing interface, implemented by the listener
theListener - the object to be informed of the events
theSource - the proxy class that represents the COM class that is the source of the events
Throws:
java.io.IOException

removeListener

public void removeListener(java.lang.String iidStr,
                           java.lang.Object theListener)
                    throws java.io.IOException
Description copied from class: Dispatch
Removes a Java object as a listener to events generated by a COM object. when you wish to invoke method on the COM object using IDispatch (not using custom marshalling).

Overrides:
removeListener in class Dispatch
Parameters:
iidStr - the ID of the outgoing interface, implemented by the listener
theListener - the object that no longer wishes to be informed of the events
Throws:
java.io.IOException

snap

public boolean snap(IPoint point,
                    double tolerance)
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IFeatureSnap
Snap the feature based on the arguments.

Supported Platforms

Windows, Solaris, Linux

Remarks

The Snap method in the IFeatureSnap interface is not implemented by the ComplexJunctionFeature class that the custom feature must aggregate. ArcMap will call this method on all complex junctions within snapping distance of the cursor if custom feature snapping is selected in the Snapping dialog box.


The custom feature is responsible for returning a Boolean value indicating whether or not the cursor can snap to one of the connection points. If the cursor can snap (the IPoint is within the tolerance distance of a connection point), then the inbound IPoint is modified to match the location of the connection point.

 

It is recommended that developers do not use Complex Junctions in their data modeling solutions.  Developers can leverage existing Geodatabase components in order to implement partial functionality, such as IFeatureClassExtension.

 

Specified by:
snap in interface IFeatureSnap
Parameters:
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
tolerance - The tolerance (in)
Returns:
The snapped
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.