|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISnapEnvironment
Provides access to members that manage the snap agents used by the editor.
The ISnapEnvironment interface is on the Editor CoClass. You can access ISnapEnvironment from any other interface on the Editor CoClass.
ISnapEnvironment
,
ISnapAgent
,
IEditProperties
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
esriSnapToleranceUnits
,
IEditSketch
Method Summary | |
---|---|
void |
addSnapAgent(ISnapAgent snapAgent)
Adds a new snap agent to the snap environment. |
void |
clearSnapAgents()
Removes all snap agents. |
ISnapAgent |
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
As an example: there may be several FeatureSnap 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 FeatureSnap's conditions and the same point is returned to SnapPoint. In the Editor, the InvertAgent location is always set equal to this point. Thus, when snapping conditions are met, the InvertAgent (blue dot) is passed the point with altered coordinates, and the corresponding location shift is manifested as a "snap".
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 method of type esriSnapToleranceUnits used to define the radius used by active snap agents. The default value 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.editor.esriSnapToleranceUnits 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
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapAgent 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(ISnapAgent snapAgent) throws IOException, AutomationException
AddSnapAgent activates and adds to the snap environment any valid snap agent, such as FeatureSnap, AnchorSnap, or PerpendicularSnap.
snapAgent
- A reference to a com.esri.arcgis.editor.ISnapAgent (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 |