|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IEngineSnapEnvironment
Provides access to members that manage the snap agents used by the editor.
The IEngineSnapEnvironment interface manages the snap agent collection and the snap tolerance properties.
IEngineFeatureSnapAgent
Method Summary | |
---|---|
void |
addSnapAgent(IEngineSnapAgent snapAgent)
Adds a new snap agent to the snap environment. |
void |
clearSnapAgents()
Removes all snap agents. |
IEngineSnapAgent |
getSnapAgent(int index)
A snap agent at the given index. |
int |
getSnapAgentCount()
The number of active snap agents. |
double |
getSnapTolerance()
The snap tolerance, measured in pixels or map units. |
int |
getSnapToleranceUnits()
The units used for the snap tolerance. |
void |
removeSnapAgent(int index)
Removes the snap agent at the given index. |
void |
setSnapTolerance(double tol)
The snap tolerance, measured in pixels or map units. |
void |
setSnapToleranceUnits(int units)
The units used for the snap tolerance. |
boolean |
snapPoint(IPoint point)
Attempts to snap the point using the current snap environment. |
Method Detail |
---|
boolean snapPoint(IPoint point) throws IOException, AutomationException
SnapPoint passes the required point parameter to each of the added snap agents in the order that these agents were added. The agents attempt, in turn, to find point coordinates that fulfill its snap properties for the incoming point. If a new snap location is found, the relevant snap agent modifies the original point's coordinates to that of the new location. The same point is then returned to SnapPoint. Once a snap agent is found that satisfies the point subsequent snap agents are not tested.
As an example: there may be several feature snap agents present. Each receives a point from the current cursor location, which is passed to the agent via the SnapPoint method. If the conditions for a snap are met, the boolean value of the agent returns TRUE, the point's coordinates are updated based on the active feature snap conditions and the same point is returned to SnapPoint.
point
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getSnapToleranceUnits() throws IOException, AutomationException
SnapToleranceUnits defines the units used to define the radius used by active snap agents. By default The default SnapToleranceUnits is esriSnapTolerancePixels.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSnapToleranceUnits(int units) throws IOException, AutomationException
units
- A com.esri.arcgis.controls.esriEngineSnapToleranceUnits constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getSnapTolerance() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSnapTolerance(double tol) throws IOException, AutomationException
tol
- The tol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getSnapAgentCount() throws IOException, AutomationException
SnapAgentCount returns the number of currently active snap agents.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEngineSnapAgent getSnapAgent(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void clearSnapAgents() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void removeSnapAgent(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addSnapAgent(IEngineSnapAgent snapAgent) throws IOException, AutomationException
AddSnapAgent activates and adds to the snap environment any valid snap agent. Snap agents which have already been added are not changed by this method. Snap agents are identified by their SnapAgent.Name and GUID.
snapAgent
- A reference to a com.esri.arcgis.controls.IEngineSnapAgent (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 |