com.esri.arcgis.editor
Class FeatureSnap

java.lang.Object
  extended by com.esri.arcgis.editor.FeatureSnap
All Implemented Interfaces:
IEditEvents, IFeatureSnapAgent, IFeatureSnapAgent2, ISnapAgent, ISnapAgentFeedback, IObjectClassEvents, com.esri.arcgis.interop.RemoteObjRef, IExtension, IPersist, IPersistStream, java.io.Externalizable, java.io.Serializable, java.util.EventListener

public class FeatureSnap
extends java.lang.Object
implements com.esri.arcgis.interop.RemoteObjRef, IFeatureSnapAgent2, ISnapAgent, IPersist, IPersistStream, IExtension, ISnapAgentFeedback, IEditEvents, IObjectClassEvents, java.io.Externalizable

COM Class 'FeatureSnap'. Generated 3/19/2015 1:20:50 PM from 'C:\ArcGIS\COM\esriEditor.olb'

Description 'Snap agent that snaps to a feature in a specified way.' Generator Options: PromptForTypeLibraries = False ClashPrefix = esri_ LowerCaseMemberNames = True IDispatchOnly = False RetryOnReject = False AwtForOcxs = True ArraysAsObjects = False DontRenameSameMethods = False ImplementConflictingInterfaces = True ReuseMethods = True RenameConflictingInterfaceMethods = True GenBeanInfo = True GenerateJavadoc =

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Fields inherited from interface com.esri.arcgis.editor.IFeatureSnapAgent2
IID, IID7c41ef14_bc5f_4848_8a4d_9478fc492213, xxDummy
 
Fields inherited from interface com.esri.arcgis.editor.IFeatureSnapAgent
IID2866e6b4_c00b_11d0_802b_0000f8037368
 
Fields inherited from interface com.esri.arcgis.editor.ISnapAgent
IID2866e6b3_c00b_11d0_802b_0000f8037368
 
Fields inherited from interface com.esri.arcgis.system.IPersistStream
IID, IID00000109_0000_0000_c000_000000000046, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.IPersist
IID0000010c_0000_0000_c000_000000000046
 
Fields inherited from interface com.esri.arcgis.system.IExtension
IID, IID7f657ec9_dbf1_11d2_9f2f_00c04f6bc69e, xxDummy
 
Fields inherited from interface com.esri.arcgis.editor.ISnapAgentFeedback
IID, IID475742fa_d9e2_4c41_ba2a_ba86d044cdc1, xxDummy
 
Fields inherited from interface com.esri.arcgis.editor.IEditEvents
IID, IID44276913_98c1_11d1_8464_0000f875b9c6, xxDummy
 
Constructor Summary
FeatureSnap()
          Constructs a FeatureSnap using ArcGIS Engine.
FeatureSnap(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
FeatureSnap theFeatureSnap = (FeatureSnap) obj;
 
Method Summary
 void afterDrawSketch(IEditEventsAfterDrawSketchEvent theEvent)
          Called after the edit sketch is drawn.
 boolean equals(java.lang.Object o)
          Compare this object with another
 void getClassID(GUID[] pClassID)
          getClassID
static java.lang.String getClsid()
          getClsid.
 IFeatureCache getFeatureCache()
          The FeatureCache associated with the feature snap agent.
 IFeatureClass getFeatureClass()
          The featureclass the feature snap agent snaps to.
 int getHitType()
          The part of a geometry the feature snap agent snaps to.
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 java.lang.String getName()
          The name of the snap agent shown in the UI.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 java.lang.String getSnapText()
          Snap Agent Feedback string.
 int hashCode()
          the hashcode for this object
 void isDirty()
          isDirty
 boolean isZSnappingEnabled()
          Indicates whether this Agent will snap in Z.
 void load(IStream pstm)
          load
 void onChange(IObjectClassEventsOnChangeEvent theEvent)
          This event is fired when an object's attributes or geometry is updated.
 void onChangeFeature(IEditEventsOnChangeFeatureEvent theEvent)
          Called when features are modified.
 void onConflictsDetected(IEditEventsOnConflictsDetectedEvent theEvent)
          Called when editing conflicts are detected during save.
 void onCreate(IObjectClassEventsOnCreateEvent theEvent)
          This event is fired when a new object is created in the object class.
 void onCreateFeature(IEditEventsOnCreateFeatureEvent theEvent)
          Called when new features are created.
 void onCurrentLayerChanged(IEditEventsOnCurrentLayerChangedEvent theEvent)
          Called when the current layer changes.
 void onCurrentTaskChanged(IEditEventsOnCurrentTaskChangedEvent theEvent)
          Called when the current task changes.
 void onDelete(IObjectClassEventsOnDeleteEvent theEvent)
          This event is fired when an object is deleted from the object class.
 void onDeleteFeature(IEditEventsOnDeleteFeatureEvent theEvent)
          Called when features are deleted.
 void onRedo(IEditEventsOnRedoEvent theEvent)
          Called when RedoOperation is called.
 void onSelectionChanged(IEditEventsOnSelectionChangedEvent theEvent)
          Called when the selection changes.
 void onSketchFinished(IEditEventsOnSketchFinishedEvent theEvent)
          Called when the edit sketch is finished.
 void onSketchModified(IEditEventsOnSketchModifiedEvent theEvent)
          Called when the edit sketch is modified.
 void onStartEditing(IEditEventsOnStartEditingEvent theEvent)
          Called when editing begins.
 void onStopEditing(IEditEventsOnStopEditingEvent theEvent)
          Called when editing ends.
 void onUndo(IEditEventsOnUndoEvent theEvent)
          Called when UndoOperation is called.
 void readExternal(java.io.ObjectInput in)
           
 void release()
          Release a FeatureSnap.
 void save(IStream pstm, int fClearDirty)
          save
 void setFeatureClassByRef(IFeatureClass featClass)
          The featureclass the feature snap agent snaps to.
 void setHitType(int hitType)
          The part of a geometry the feature snap agent snaps to.
 void setZSnappingEnabled(boolean zSnapEnabled)
          Indicates whether this Agent will snap in Z.
 void shutdown()
          Shuts down the extension.
 boolean snap(IGeometry geom, IPoint point, double tolerance)
          Called by the editor to perform the actual snapping logic.
 void startup(java.lang.Object initializationData)
          Starts up the extension with the given initialization data.
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

FeatureSnap

public FeatureSnap()
            throws java.io.IOException,
                   java.net.UnknownHostException
Constructs a FeatureSnap using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

FeatureSnap

public FeatureSnap(java.lang.Object obj)
            throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
FeatureSnap theFeatureSnap = (FeatureSnap) obj;

Construct a FeatureSnap using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to FeatureSnap.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
java.io.IOException - if there are interop problems
Method Detail

getClsid

public static java.lang.String getClsid()
getClsid.


equals

public boolean equals(java.lang.Object o)
Compare this object with another

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class java.lang.Object

getJintegraDispatch

public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
Deprecated. Internal use only.

Specified by:
getJintegraDispatch in interface com.esri.arcgis.interop.RemoteObjRef

release

public void release()
Release a FeatureSnap.

Specified by:
release in interface com.esri.arcgis.interop.RemoteObjRef

setZSnappingEnabled

public void setZSnappingEnabled(boolean zSnapEnabled)
                         throws java.io.IOException,
                                AutomationException
Indicates whether this Agent will snap in Z.

Specified by:
setZSnappingEnabled in interface IFeatureSnapAgent2
Parameters:
zSnapEnabled - The zSnapEnabled (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isZSnappingEnabled

public boolean isZSnappingEnabled()
                           throws java.io.IOException,
                                  AutomationException
Indicates whether this Agent will snap in Z.

Specified by:
isZSnappingEnabled in interface IFeatureSnapAgent2
Returns:
The zSnapEnabled
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFeatureClassByRef

public void setFeatureClassByRef(IFeatureClass featClass)
                          throws java.io.IOException,
                                 AutomationException
The featureclass the feature snap agent snaps to.

Specified by:
setFeatureClassByRef in interface IFeatureSnapAgent
Parameters:
featClass - A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFeatureClass

public IFeatureClass getFeatureClass()
                              throws java.io.IOException,
                                     AutomationException
The featureclass the feature snap agent snaps to.

Specified by:
getFeatureClass in interface IFeatureSnapAgent
Returns:
A reference to a com.esri.arcgis.geodatabase.IFeatureClass
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setHitType

public void setHitType(int hitType)
                throws java.io.IOException,
                       AutomationException
The part of a geometry the feature snap agent snaps to.

Specified by:
setHitType in interface IFeatureSnapAgent
Parameters:
hitType - A com.esri.arcgis.geometry.esriGeometryHitPartType constant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHitType

public int getHitType()
               throws java.io.IOException,
                      AutomationException
The part of a geometry the feature snap agent snaps to.

Specified by:
getHitType in interface IFeatureSnapAgent
Returns:
A com.esri.arcgis.geometry.esriGeometryHitPartType constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFeatureCache

public IFeatureCache getFeatureCache()
                              throws java.io.IOException,
                                     AutomationException
The FeatureCache associated with the feature snap agent.

Specified by:
getFeatureCache in interface IFeatureSnapAgent
Returns:
A reference to a com.esri.arcgis.carto.IFeatureCache
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

public java.lang.String getName()
                         throws java.io.IOException,
                                AutomationException
The name of the snap agent shown in the UI.

Specified by:
getName in interface ISnapAgent
Specified by:
getName in interface IExtension
Returns:
The name
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

snap

public boolean snap(IGeometry geom,
                    IPoint point,
                    double tolerance)
             throws java.io.IOException,
                    AutomationException
Called by the editor to perform the actual snapping logic.

Specified by:
snap in interface ISnapAgent
Parameters:
geom - A reference to a com.esri.arcgis.geometry.IGeometry (in)
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.

getClassID

public void getClassID(GUID[] pClassID)
                throws java.io.IOException,
                       AutomationException
getClassID

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws java.io.IOException,
                    AutomationException
isDirty

Specified by:
isDirty in interface IPersistStream
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pstm)
          throws java.io.IOException,
                 AutomationException
load

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws java.io.IOException,
                 AutomationException
save

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws java.io.IOException,
                       AutomationException
getSizeMax

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startup

public void startup(java.lang.Object initializationData)
             throws java.io.IOException,
                    AutomationException
Starts up the extension with the given initialization data.

Specified by:
startup in interface IExtension
Parameters:
initializationData - A Variant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

shutdown

public void shutdown()
              throws java.io.IOException,
                     AutomationException
Shuts down the extension.

Specified by:
shutdown in interface IExtension
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSnapText

public java.lang.String getSnapText()
                             throws java.io.IOException,
                                    AutomationException
Snap Agent Feedback string.

Specified by:
getSnapText in interface ISnapAgentFeedback
Returns:
The text
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onSelectionChanged

public void onSelectionChanged(IEditEventsOnSelectionChangedEvent theEvent)
                        throws java.io.IOException,
                               AutomationException
Called when the selection changes.

Specified by:
onSelectionChanged in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onCurrentLayerChanged

public void onCurrentLayerChanged(IEditEventsOnCurrentLayerChangedEvent theEvent)
                           throws java.io.IOException,
                                  AutomationException
Called when the current layer changes.

Specified by:
onCurrentLayerChanged in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onCurrentTaskChanged

public void onCurrentTaskChanged(IEditEventsOnCurrentTaskChangedEvent theEvent)
                          throws java.io.IOException,
                                 AutomationException
Called when the current task changes.

Specified by:
onCurrentTaskChanged in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onSketchModified

public void onSketchModified(IEditEventsOnSketchModifiedEvent theEvent)
                      throws java.io.IOException,
                             AutomationException
Called when the edit sketch is modified.

Specified by:
onSketchModified in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onSketchFinished

public void onSketchFinished(IEditEventsOnSketchFinishedEvent theEvent)
                      throws java.io.IOException,
                             AutomationException
Called when the edit sketch is finished.

Specified by:
onSketchFinished in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

afterDrawSketch

public void afterDrawSketch(IEditEventsAfterDrawSketchEvent theEvent)
                     throws java.io.IOException,
                            AutomationException
Called after the edit sketch is drawn.

Specified by:
afterDrawSketch in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onStartEditing

public void onStartEditing(IEditEventsOnStartEditingEvent theEvent)
                    throws java.io.IOException,
                           AutomationException
Called when editing begins.

Specified by:
onStartEditing in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onStopEditing

public void onStopEditing(IEditEventsOnStopEditingEvent theEvent)
                   throws java.io.IOException,
                          AutomationException
Called when editing ends.

Specified by:
onStopEditing in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onConflictsDetected

public void onConflictsDetected(IEditEventsOnConflictsDetectedEvent theEvent)
                         throws java.io.IOException,
                                AutomationException
Called when editing conflicts are detected during save.

Specified by:
onConflictsDetected in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onUndo

public void onUndo(IEditEventsOnUndoEvent theEvent)
            throws java.io.IOException,
                   AutomationException
Called when UndoOperation is called.

Specified by:
onUndo in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onRedo

public void onRedo(IEditEventsOnRedoEvent theEvent)
            throws java.io.IOException,
                   AutomationException
Called when RedoOperation is called.

Specified by:
onRedo in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onCreateFeature

public void onCreateFeature(IEditEventsOnCreateFeatureEvent theEvent)
                     throws java.io.IOException,
                            AutomationException
Called when new features are created.

Specified by:
onCreateFeature in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onChangeFeature

public void onChangeFeature(IEditEventsOnChangeFeatureEvent theEvent)
                     throws java.io.IOException,
                            AutomationException
Called when features are modified.

Specified by:
onChangeFeature in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onDeleteFeature

public void onDeleteFeature(IEditEventsOnDeleteFeatureEvent theEvent)
                     throws java.io.IOException,
                            AutomationException
Called when features are deleted.

Specified by:
onDeleteFeature in interface IEditEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onCreate

public void onCreate(IObjectClassEventsOnCreateEvent theEvent)
              throws java.io.IOException,
                     AutomationException
This event is fired when a new object is created in the object class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
onCreate in interface IObjectClassEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onDelete

public void onDelete(IObjectClassEventsOnDeleteEvent theEvent)
              throws java.io.IOException,
                     AutomationException
This event is fired when an object is deleted from the object class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
onDelete in interface IObjectClassEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onChange

public void onChange(IObjectClassEventsOnChangeEvent theEvent)
              throws java.io.IOException,
                     AutomationException
This event is fired when an object's attributes or geometry is updated.

Remarks

In the event that a feature should be deleted due to an OnChange event, it is not recommended that the event handler delete the feature itself. Instead, an exception should be thrown to the application, where it can be made responsible for deleting the feature.

The OnChange event is not fired during a Topology Validation for performance reasons as a large number of features may be changed during a Validate. In addition, features may be changed many times.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
onChange in interface IObjectClassEvents
Parameters:
theEvent - The event
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException