|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.controls.EngineFeatureSnap
public class EngineFeatureSnap
An engine snap agent that snaps to features in a specific feature class.
Constructor Summary | |
---|---|
EngineFeatureSnap()
Constructs a EngineFeatureSnap using ArcGIS Engine. |
|
EngineFeatureSnap(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. EngineFeatureSnap theEngineFeatureSnap = (EngineFeatureSnap) obj; |
Method Summary | |
---|---|
boolean |
equals(Object o)
Compare this object with another |
static String |
getClsid()
getClsid. |
IFeatureCache |
getFeatureCache()
The FeatureCache associated with the engine feature snap agent. |
IFeatureClass |
getFeatureClass()
The featureclass the feature snap agent snaps to. |
int |
getHitType()
The part of a geometry the engine feature snap agent snaps to. |
String |
getName()
The name of the engine snap agent. |
int |
hashCode()
the hashcode for this object |
void |
setFeatureClassByRef(IFeatureClass featClass)
The featureclass the feature snap agent snaps to. |
void |
setHitType(int hitType)
The part of a geometry the engine feature snap agent snaps to. |
boolean |
snap(IGeometry geom,
IPoint point,
double tolerance)
Fired by the Engine Editor to perform the actual snapping logic. |
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 EngineFeatureSnap() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic EngineFeatureSnap(Object obj) throws IOException
EngineFeatureSnap theEngineFeatureSnap = (EngineFeatureSnap) obj;
obj
to EngineFeatureSnap
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void setFeatureClassByRef(IFeatureClass featClass) throws IOException, AutomationException
setFeatureClassByRef
in interface IEngineFeatureSnapAgent
featClass
- 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 IEngineFeatureSnapAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setHitType(int hitType) throws IOException, AutomationException
setHitType
in interface IEngineFeatureSnapAgent
hitType
- 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 IEngineFeatureSnapAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFeatureCache getFeatureCache() throws IOException, AutomationException
This property has no significance when creating a new engine 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 engine 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.
getFeatureCache
in interface IEngineFeatureSnapAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getName() throws IOException, AutomationException
getName
in interface IEngineSnapAgent
IOException
- 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 IEngineSnapEnvironment::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 are possible. Resetting the IPoint interface to a different Point object will have no effect after leaving the scope of the function.
snap
in interface IEngineSnapAgent
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |