|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.arcgis.editor.FeatureSnap
public class FeatureSnap
Snap agent that snaps to a feature in a specified way.
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.
| 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 |
|---|
public FeatureSnap()
throws IOException,
UnknownHostException
IOException - if there are interop problems
UnknownHostException - if there are interop problems
public FeatureSnap(Object obj)
throws IOException
FeatureSnap theFeatureSnap = (FeatureSnap) obj;
obj to FeatureSnap.
obj - an object returned from ArcGIS Engine or Server
IOException - if there are interop problems| Method Detail |
|---|
public static String getClsid()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
public void setZSnappingEnabled(boolean zSnapEnabled)
throws IOException,
AutomationException
setZSnappingEnabled in interface IFeatureSnapAgent2zSnapEnabled - The zSnapEnabled (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public boolean isZSnappingEnabled()
throws IOException,
AutomationException
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.
isZSnappingEnabled in interface IFeatureSnapAgent2IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setFeatureClassByRef(IFeatureClass featClass)
throws IOException,
AutomationException
setFeatureClassByRef in interface IFeatureSnapAgentfeatClass - A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IFeatureClass getFeatureClass()
throws IOException,
AutomationException
getFeatureClass in interface IFeatureSnapAgentIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setHitType(int hitType)
throws IOException,
AutomationException
Dim pFeatSnap as IFeatureSnapAgent
Set pFeatSnap = New FeatureSnap
pFeatSnap.HitType = esriGeometryPartVertex
setHitType in interface IFeatureSnapAgenthitType - A com.esri.arcgis.geometry.esriGeometryHitPartType constant (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public int getHitType()
throws IOException,
AutomationException
getHitType in interface IFeatureSnapAgentIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IFeatureCache getFeatureCache()
throws IOException,
AutomationException
getFeatureCache in interface IFeatureSnapAgentIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public String getName()
throws IOException,
AutomationException
getName in interface ISnapAgentgetName in interface IExtensionIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public boolean snap(IGeometry geom,
IPoint point,
double tolerance)
throws IOException,
AutomationException
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.
snap in interface ISnapAgentgeom - 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)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.ISnapEnvironment
public void getClassID(GUID[] pClassID)
throws IOException,
AutomationException
IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.
getClassID in interface IPersistpClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void isDirty()
throws IOException,
AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
isDirty in interface IPersistStreamIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void load(IStream pstm)
throws IOException,
AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
load in interface IPersistStreampstm - A reference to a com.esri.arcgis.system.IStream (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void save(IStream pstm,
int fClearDirty)
throws IOException,
AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
save in interface IPersistStreampstm - A reference to a com.esri.arcgis.system.IStream (in)fClearDirty - The fClearDirty (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
throws IOException,
AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
getSizeMax in interface IPersistStreampcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void startup(Object initializationData)
throws IOException,
AutomationException
startup in interface IExtensioninitializationData - A Variant (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void shutdown()
throws IOException,
AutomationException
shutdown in interface IExtensionIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public String getSnapText()
throws IOException,
AutomationException
SnapText is used to populate the semi-transparent window that appears when a snap agent's Snap method returns true.
getSnapText in interface ISnapAgentFeedbackIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onSelectionChanged(IEditEventsOnSelectionChangedEvent theEvent)
throws IOException,
AutomationException
onSelectionChanged in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onCurrentLayerChanged(IEditEventsOnCurrentLayerChangedEvent theEvent)
throws IOException,
AutomationException
onCurrentLayerChanged in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onCurrentTaskChanged(IEditEventsOnCurrentTaskChangedEvent theEvent)
throws IOException,
AutomationException
onCurrentTaskChanged in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onSketchModified(IEditEventsOnSketchModifiedEvent theEvent)
throws IOException,
AutomationException
onSketchModified in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onSketchFinished(IEditEventsOnSketchFinishedEvent theEvent)
throws IOException,
AutomationException
onSketchFinished in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void afterDrawSketch(IEditEventsAfterDrawSketchEvent theEvent)
throws IOException,
AutomationException
afterDrawSketch in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onStartEditing(IEditEventsOnStartEditingEvent theEvent)
throws IOException,
AutomationException
onStartEditing in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onStopEditing(IEditEventsOnStopEditingEvent theEvent)
throws IOException,
AutomationException
onStopEditing in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onConflictsDetected(IEditEventsOnConflictsDetectedEvent theEvent)
throws IOException,
AutomationException
onConflictsDetected in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onUndo(IEditEventsOnUndoEvent theEvent)
throws IOException,
AutomationException
onUndo in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onRedo(IEditEventsOnRedoEvent theEvent)
throws IOException,
AutomationException
onRedo in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onCreateFeature(IEditEventsOnCreateFeatureEvent theEvent)
throws IOException,
AutomationException
onCreateFeature in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onChangeFeature(IEditEventsOnChangeFeatureEvent theEvent)
throws IOException,
AutomationException
onChangeFeature in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onDeleteFeature(IEditEventsOnDeleteFeatureEvent theEvent)
throws IOException,
AutomationException
onDeleteFeature in interface IEditEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onCreate(IObjectClassEventsOnCreateEvent theEvent)
throws IOException,
AutomationException
onCreate in interface IObjectClassEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onDelete(IObjectClassEventsOnDeleteEvent theEvent)
throws IOException,
AutomationException
onDelete in interface IObjectClassEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void onChange(IObjectClassEventsOnChangeEvent theEvent)
throws IOException,
AutomationException
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.
onChange in interface IObjectClassEventstheEvent - The event
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOException
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||