|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.interop.Dispatch com.esri.arcgis.controls.ISnappingEnvironmentProxy
public class ISnappingEnvironmentProxy
ISnappingEnvironment Interface
ISnappingEnvironment is the primary interface for working with and managing the snapping environment at 10.0. Other snapping methods available at previous versions, notably the ArcMap editor’s snap environment (accessed from IEditor.SnapEnvironment) and the engine editor’s snapping environment (accessed via IEngineSnapEnvironment) still exist at ArcGIS 10.0. These are separate environments and developers should be aware of which snapping environment their tools are using. One of the main benefits of the new snapping environment is its availability to both ArcMap and ArcGIS Engine developers, and the capability to utilize snapping for all tools, not editing.
Field Summary | |
---|---|
boolean |
noncastable
|
Fields inherited from class com.esri.arcgis.interop.Dispatch |
---|
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef |
Constructor Summary | |
---|---|
|
ISnappingEnvironmentProxy()
|
|
ISnappingEnvironmentProxy(Object obj)
|
protected |
ISnappingEnvironmentProxy(Object obj,
String iid)
|
Method Summary | |
---|---|
void |
addListener(String iidStr,
Object theListener,
Object theSource)
|
IPointSnapper |
getPointSnapper()
Returns the point snapper. |
int |
getSnappingType()
The types of snapping currently being considered. |
IColor |
getSnapSymbolColor()
The color of the snapping symbol. |
ITextSymbol |
getSnapTipSymbol()
The symbol that displays the snap tip. |
int |
getSnapTipType()
The types of snapping tip to be displayed. |
int |
getTolerance()
Sets the snap tolerance in pixels. |
boolean |
isEnabled()
Toggles snapping on/off. |
boolean |
isIgnoreIMSLayers()
Ignores layers with slow response times. |
boolean |
isShowSnapTipBackground()
Toggles snap tip background on/off. |
boolean |
isShowSnapTips()
Toggles snap tips on/off. |
boolean |
isTextSnapping()
Toggles snapping to text on/off. |
void |
removeListener(String iidStr,
Object theListener)
|
void |
setEnabled(boolean snapping)
Toggles snapping on/off. |
void |
setIgnoreIMSLayers(boolean flag)
Ignores layers with slow response times. |
void |
setPointSnapperByRef(IPointSnapper snapper)
Returns the point snapper. |
void |
setShowSnapTipBackground(boolean show)
Toggles snap tip background on/off. |
void |
setShowSnapTips(boolean show)
Toggles snap tips on/off. |
void |
setSnappingType(int options)
The types of snapping currently being considered. |
void |
setSnapSymbolColorByRef(IColor color)
The color of the snapping symbol. |
void |
setSnapTipSymbolByRef(ITextSymbol symbol)
The symbol that displays the snap tip. |
void |
setSnapTipType(int options)
The types of snapping tip to be displayed. |
void |
setTextSnapping(boolean snapping)
Toggles snapping to text on/off. |
void |
setTolerance(int tol)
Sets the snap tolerance in pixels. |
Methods inherited from class com.esri.arcgis.interop.Dispatch |
---|
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean noncastable
Constructor Detail |
---|
public ISnappingEnvironmentProxy()
public ISnappingEnvironmentProxy(Object obj) throws IOException
IOException
protected ISnappingEnvironmentProxy(Object obj, String iid) throws IOException
IOException
Method Detail |
---|
public void addListener(String iidStr, Object theListener, Object theSource) throws IOException
addListener
in class com.esri.arcgis.interop.Dispatch
IOException
public void removeListener(String iidStr, Object theListener) throws IOException
removeListener
in class com.esri.arcgis.interop.Dispatch
IOException
public boolean isEnabled() throws IOException, AutomationException
The Enabled property determines whether the snapping environment is active. If enabled, tools that utilize the mouse movement will return valid ISnappingResult references. Because this is setting is shared across all tools and applications, it is not recommended that individual tools modify this setting.
isEnabled
in interface ISnappingEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setEnabled(boolean snapping) throws IOException, AutomationException
setEnabled
in interface ISnappingEnvironment
snapping
- The snapping (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isTextSnapping() throws IOException, AutomationException
isTextSnapping
in interface ISnappingEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTextSnapping(boolean snapping) throws IOException, AutomationException
setTextSnapping
in interface ISnappingEnvironment
snapping
- The snapping (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSnappingType() throws IOException, AutomationException
Use the esriSnappingType enumeration to define which snapping types should be evaluated when IPointSnapper.Snap is called. An individual snapping type can be specified, or a combination of snapping types may be used. The combination of snapping types is accomplished using a bit mask.
Snapping Types are evaluated in a fixed order defined below:
SnappingType is an application-level setting.
getSnappingType
in interface ISnappingEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSnappingType(int options) throws IOException, AutomationException
setSnappingType
in interface ISnappingEnvironment
options
- A com.esri.arcgis.controls.esriSnappingType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isShowSnapTips() throws IOException, AutomationException
Determines whether snap tips are shown when a snapping type is satisfied. By default, snap tips are shown. The information displayed in the snap tip is determined by ISnappingEnvironment.SnapTipType.
ShowSnapTips is an application-level setting.
isShowSnapTips
in interface ISnappingEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setShowSnapTips(boolean show) throws IOException, AutomationException
setShowSnapTips
in interface ISnappingEnvironment
show
- The show (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSnapTipType() throws IOException, AutomationException
The snapping tip type can contain the layer name of the feature layer that was snapped to, or the snapping type that was satisfied. The default is to show both the layer name and the snapping type as part of the snap tip.
getSnapTipType
in interface ISnappingEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSnapTipType(int options) throws IOException, AutomationException
setSnapTipType
in interface ISnappingEnvironment
options
- A com.esri.arcgis.controls.esriSnappingTipType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ITextSymbol getSnapTipSymbol() throws IOException, AutomationException
The SnapTipSymbol defines the textsymbol that is used to display information provided in the snap result’s description after a valid snap location was found. If ISnappingEnvironment.SnapTipType = 0 (no snap tip) this setting had no effect.
You have a number of options to customize the tip symbol, including advanced text capabilities provided by IFormattedTextSymbol to provide options for backgrounds, offsets, or right-to-left text capabilities.
The location of the tip is not customizable; the application will display the snap tip above and to the right of the snap location, unless at the extreme top or right bounds of the display.
SnapTipSymbol is an application-level setting.
getSnapTipSymbol
in interface ISnappingEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSnapTipSymbolByRef(ITextSymbol symbol) throws IOException, AutomationException
setSnapTipSymbolByRef
in interface ISnappingEnvironment
symbol
- A reference to a com.esri.arcgis.display.ITextSymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isShowSnapTipBackground() throws IOException, AutomationException
The snapping tip uses XOR to display the snapping tip text. If you are snapping against an orthophoto or other imagery data source, the text may be difficult to see. By setting ShowTipBackground to true, a solid color is displayed so the snap tip text may be clearly seen.
This is an application-level setting, and is false by default.
isShowSnapTipBackground
in interface ISnappingEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setShowSnapTipBackground(boolean show) throws IOException, AutomationException
setShowSnapTipBackground
in interface ISnappingEnvironment
show
- The show (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IColor getSnapSymbolColor() throws IOException, AutomationException
Specifies the color of the snapping symbol displayed when a valid snap result was found. The default color is black. Changing the color to a high contrast value such as yellow or cyan is particularly useful in situations where you are working against imagery or other layers symbolized using grayscale. The snap symbol itself cannot be altered.
getSnapSymbolColor
in interface ISnappingEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSnapSymbolColorByRef(IColor color) throws IOException, AutomationException
setSnapSymbolColorByRef
in interface ISnappingEnvironment
color
- A reference to a com.esri.arcgis.display.IColor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTolerance(int tol) throws IOException, AutomationException
setTolerance
in interface ISnappingEnvironment
tol
- The tol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getTolerance() throws IOException, AutomationException
The tolerance defines the distance used to determine whether a given snapping type is satisfied. The tolerance is defined in pixels; the default is 7 pixels.
The tolerance is an application-level setting.
getTolerance
in interface ISnappingEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPointSnapper getPointSnapper() throws IOException, AutomationException
The PointSnapper property returns a reference to the engine that is responsible for performing snapping operations.
getPointSnapper
in interface ISnappingEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPointSnapperByRef(IPointSnapper snapper) throws IOException, AutomationException
setPointSnapperByRef
in interface ISnappingEnvironment
snapper
- A reference to a com.esri.arcgis.controls.IPointSnapper (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isIgnoreIMSLayers() throws IOException, AutomationException
The IgnoreIMSLayers setting excludes IMS feature service layers from participating in the snapping cache. In most cases, the time required to build the snapping cache against IMS layers is not fast enough, so they are automatically excluded from the snapping cache. In certain situations, the IMS layer response time is reasonable (such as an IMS service on an intranet) setting this property to false will include these layers in the snapping cache. IgnoreIMSLayers is set to true by default.
isIgnoreIMSLayers
in interface ISnappingEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setIgnoreIMSLayers(boolean flag) throws IOException, AutomationException
setIgnoreIMSLayers
in interface ISnappingEnvironment
flag
- The flag (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 |