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, Externalizable, Serializable, EventListener

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

Snap agent that snaps to a feature in a specified way.

Remarks

Feature snap agents are a specific class of snap agents. The sketch tools and other editing tools use feature snap agents to find features to which to snap. A feature snap agent is automatically instantiated for each editable feature class the first time the snapping window is opened. Alternatively, you can cocreate a new feature snap agent, set its properties, and manually add it to the snapping environment. The editor will not replace manually added feature snap agents when the snapping window is opened.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.system.IExtension
IID, IID7f657ec9_dbf1_11d2_9f2f_00c04f6bc69e, xxDummy
 
Constructor Summary
FeatureSnap()
          Constructs a FeatureSnap using ArcGIS Engine.
FeatureSnap(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(Object o)
          Compare this object with another
 void getClassID(GUID[] pClassID)
          getClassID
static 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.
 String getName()
          The name of the snap agent shown in the UI.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 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(ObjectInput in)
           
 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(Object initializationData)
          Starts up the extension with the given initialization data.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

FeatureSnap

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

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

FeatureSnap

public FeatureSnap(Object obj)
            throws 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:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

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

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

setZSnappingEnabled

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

Product Availability

Available with ArcGIS Desktop.

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

isZSnappingEnabled

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

Remarks

Determines whether the snap agent referencing z-aware data should test the snap point against the Z-snap tolerance defined by ISnapEnvironment2::SnapZTolerance. The z-snap agent is evaluated using this tolerance only if the feature snap agent's HitType is active for one or more XY constraints.

Product Availability

Available with ArcGIS Desktop.

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

setFeatureClassByRef

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

Remarks

Specifies the feature class the snap agent will attempt to snap to.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getFeatureClass

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

Remarks

Specifies the feature class the snap agent will attempt to snap to.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

setHitType

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

Remarks

Use this property to specify the part of a geometry the FeatureSnapAgent should snap to. HitType must be set to one of the members of the esriGeometryHitPartType enumeration . Valid types are:

esriGeometryPartBoundary
esriGeometryPartCenter
esriGeometryPartExterior
esriGeometryPartInterior
esriGeometryPartMidpoint
esriGeometryPartNone
esriGeometryPartVertex

For example:

 Dim pFeatSnap as IFeatureSnapAgent


Set pFeatSnap = New FeatureSnap
pFeatSnap.HitType = esriGeometryPartVertex

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getHitType

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

Remarks

Use this property to specify the part of a geometry the FeatureSnapAgent should snap to. HitType must be set to one of the members of the esriGeometryHitPartType enumeration. Valid types are:

esriGeometryPartBoundary
esriGeometryPartCentroid
esriGeometryPartEndpoint
esriGeometryPartMidpoint
esriGeometryPartNone
esriGeometryPartVertex

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getFeatureCache

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

Remarks

This property has no significance when creating a new feature snap agent. Instead, it is used, albeit rarely, inside a sketch tool to perform custom operations on features held in the snapping environments feature cache. For example, the editor's SketchTool can issue an angular constraint and still honor the current snapping environment. If this case, a new point would be on the specified angle no matter what but its distance away may change depending on whether or not the point falls within the snap tolerance of a feature. To implement this, the Sketch Tool issues the angular constraint and then reuses the snapping environments feature caches to check if the new point is within snap tolerance of a feature belonging to one of the feature snap agents. You could create your own caches to do this, one for each feature snap agent, but since they already exist, it is much easier to use them.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getName

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

Remarks

To find a particular snap agent you made need to cycle through all of the loaded snap agents using the Name property. For Feature Snap Agents, the name is that of their featureclass.

When creating a custom snap agent, make sure to give it a unique name.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getName in interface ISnapAgent
Specified by:
getName in interface IExtension
Returns:
The name
Throws:
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 IOException,
                    AutomationException
Called by the editor to perform the actual snapping logic.

Remarks

Each snap agent uniquely implements the Snap method. Although each snap agent's Snap method can be called directly, typically the ISnapEnvironment::SnapPoint method is used to call this function for each loaded snap agent until one of them reports it has modified the passed in point's properties. To facilitate this behavior, each snap agent's Snap method must return a Boolean variable indicating whether or not it has modified the passed in points coordinates.

Snapping the passed in point means changing its x,y location properties. Because an IPoint interface pointer is passed into this function ByValue , direct edits of the point's parameters is possible. Resetting the IPoint interface to a different Point object will have no effect after leaving the scope of the function.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment

getClassID

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

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

save

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

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getSizeMax

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

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

startup

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

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

shutdown

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

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

getSnapText

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

Remarks

SnapText is used to populate the semi-transparent window that appears when a snap agent's Snap method returns true.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onSelectionChanged

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

Remarks

Whenever the feature selection status changes during an edit session, the OnSelectionChanged event is fired. Whenever the selection changes the location of the editor's SelectionAnchor is updated; if the AuxiliarySelectionAnchor is visible then its location is updated also.

When To Use

Use IEditEvents::OnSelectionChanged to execute code immediately after a change in the status of the feature selection. In the attached Visual Basic class module example, the methodology for tapping into the editor events is shown.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onCurrentLayerChanged

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

Remarks

Whenever the current layer changes during an edit session, the OnCurrentLayerChanged event is fired.

When To Use

Use IEditEvents::OnCurrentLayerChanged to execute code immediately after the user changes to another layer. In the attached Visual Basic class module example, the methodology for tapping into the editor events is shown.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onCurrentTaskChanged

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

Remarks

Whenever the current task changes during an edit session, the OnCurrentTaskChanged event is fired.

When To Use

Use IEditEvents::OnCurrentTaskChanged to execute code immediately after the user changes to a different task. In the attached Visual Basic class module example, the methodology for tapping into the editor events is shown.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onSketchModified

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

Remarks

Whenever sketch vertices are deleted, added, or moved during an edit session, the OnSketchModified is fired.

When To Use

Use IEditEvents::OnSketchModified to execute code immediately after the user adds, deletes, or moves a vertex in an edit sketch. In the attached Visual Basic class module example, the methodology for tapping into the editor events is shown.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onSketchFinished

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

Remarks

Whenever a sketch is completed during an edit session, the OnSketchFinished event is fired.

When To Use

Use IEditEvents::OnSketchFinished to execute code immediately after the user activates the IEditSketch::FinishSketch method to complete creation of a feature in an edit sketch. In the attached Visual Basic class module example, the methodology for tapping into the editor events is shown.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

afterDrawSketch

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

Remarks

Whenever the edit sketch is refreshed during an edit session, the AfterDrawSketch event is fired.

When To Use

Use IEditEvents::AfterdrawSketch to execute code immediately after the sketch-graphics are refreshed. In the attached Visual Basic class module example, the methodology for tapping into the editor events is shown.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onStartEditing

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

Remarks

Whenever an edit session is started, the OnStartEditing event is fired.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onStopEditing

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

Remarks

Whenever an edit session ends, the OnStopEditing event is fired.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onConflictsDetected

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

Remarks

Whenever conflicts are detected after a Save Edits or reconcile operation, the OnConflictsDetected event is fired.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onUndo

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

Remarks

Whenever an edit operation is undone, the OnUndo event is fired. For example, if a feature is moved and Undo is called, the OnUndo is fired. This event is not fired when sketch operations are undone. For example, undoing the addition of a point to the edit sketch does not trigger the OnUndo event.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onRedo

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

Remarks

Whenever an edit operation is redone, the OnRedo event is fired. For example, if a feature is moved and Undo and Redo are called, the OnUndo and OnRedo events are fired. This event is not fired when sketch operations are redone. For example, redoing the addition of a point to the edit sketch does not trigger the OnRedo event.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onCreateFeature

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

Remarks

Whenever a new feature is created the OnCreateFeature event is fired. The new feature is passed to all listening clients via the IObject parameter.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onChangeFeature

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

Remarks

Whenever a new feature is changed the OnChangeFeature event is fired. The changed feature is passed to all listening clients via the IObject parameter.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onDeleteFeature

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

Remarks

Whenever a new feature is deleted the OnDeleteFeature event is fired. The deleted feature is passed to all listening clients via the IObject parameter.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onCreate

public void onCreate(IObjectClassEventsOnCreateEvent theEvent)
              throws 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:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onDelete

public void onDelete(IObjectClassEventsOnDeleteEvent theEvent)
              throws 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:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onChange

public void onChange(IObjectClassEventsOnChangeEvent theEvent)
              throws 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:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

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

readExternal

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