com.esri.arcgis.controls
Interface IMapControl3

All Superinterfaces:
IMapControl2, Serializable
All Known Subinterfaces:
IMapControl4
All Known Implementing Classes:
IMapControl3Proxy, IMapControl4Proxy, MapBean, MapControl

public interface IMapControl3
extends IMapControl2, Serializable

Provides access to members that control the MapControl.

Superseded By

IMapControl4

Description

The IMapControl3 interface provides additional members for tasks related to the MapControl, such as setting a custom property and suppressing data redraw whilst the MapControl is being resized.

Product Availability

Available with ArcGIS Engine.


Method Summary
 Object getCustomProperty()
          A property to associate data with a control.
 String getDocumentFilename()
          The filename of the last map document loaded into the control.
 String getDocumentMap()
          The name of the map that was last loaded into the control from a map document.
 int getKeyIntercept()
          A property that specifies interception of key strokes that are normally handled by the container.
 Object getObject()
          A property that returns the underlying control.
 int getTipDelay()
          The delay before map tips are shown.
 int getTipStyle()
          The style of map tips.
 boolean isShowMapTips()
          Indicates if map tips are shown.
 void setCustomProperty(Object pVal)
          A property to associate data with a control.
 void setDocumentFilename(String pVal)
          The filename of the last map document loaded into the control.
 void setDocumentMap(String pVal)
          The name of the map that was last loaded into the control from a map document.
 void setKeyIntercept(int pVal)
          A property that specifies interception of key strokes that are normally handled by the container.
 void setShowMapTips(boolean show)
          Indicates if map tips are shown.
 void setTipDelay(int delay)
          The delay before map tips are shown.
 void setTipStyle(int style)
          The style of map tips.
 void suppressResizeDrawing(boolean suppressResize, int resizeHWnd)
          Suppress full redraw of control during resize operations.
 
Methods inherited from interface com.esri.arcgis.controls.IMapControl2
aboutBox, addLayer, addLayerFromFile, addShapeFile, centerAt, checkMxFile, clearLayers, deleteLayer, drawShape, drawText, esri_isEnabled, esri_setEnabled, flashShape, fromMapPoint, getActiveView, getAppearance, getBackColor, getBorderStyle, getCurrentTool, getExtent, getFullExtent, getHWnd, getLayer, getLayerCount, getMap, getMapScale, getMapUnits, getMouseIcon, getMousePointer, getReferenceScale, getRotation, getSpatialReference, getTrackCancel, isOleDropEnabled, isShowScrollbars, loadMxFile, moveLayerTo, pan, readMxMaps, refresh, setAppearance, setBackColor, setBorderStyle, setCurrentToolByRef, setExtent, setFullExtent, setMapByRef, setMapScale, setMapUnits, setMouseIconByRef, setMousePointer, setOleDropEnabled, setReferenceScale, setRotation, setShowScrollbars, setSpatialReferenceByRef, setTrackCancelByRef, setVisibleRegion, toMapPoint, trackCircle, trackLine, trackPolygon, trackRectangle
 

Method Detail

getCustomProperty

Object getCustomProperty()
                         throws IOException,
                                AutomationException
A property to associate data with a control.

Description

Use the CustomProperty to associate any useful data with the MapControl. This is similar to a 'Tag' property, and can be use to store strings, numbers and objects.

Product Availability

Available with ArcGIS Engine.

Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCustomProperty

void setCustomProperty(Object pVal)
                       throws IOException,
                              AutomationException
A property to associate data with a control.

Product Availability

Available with ArcGIS Engine.

Parameters:
pVal - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

suppressResizeDrawing

void suppressResizeDrawing(boolean suppressResize,
                           int resizeHWnd)
                           throws IOException,
                                  AutomationException
Suppress full redraw of control during resize operations.

Description

If the MapControl contains a lot of data, redrawing this data during a resize event can be costly. To increase performance you can suppress the data redraw until the resizing is complete with the SuppressResizeDrawing method. During the resize a stretched bitmap will be drawn instead.

Passing the suppressResize value sets the IScreenDisplay::SuppressResize property on the ActiveView. Pass True to suppress normal drawing and draw a stretched bitmap when a resize event begins. During the resize the data is not refereshed and the captured image is stretched. As such, the image can appear pixelated when a small display area is resized to a large display area. Pass False to resume normal drawing when a resize event ends.

In development environments that do not trap the beginning and end of a resize event, the MapControl can 'watch' the hwnd supplied to the SuppressResizeDrawing method. When a form or container starts resizing the WM_ENTERSIZEMOVE windows messge is sent and the MapControl will set suppressResize to True. When windows sends the WM_EXITSIZEMOVE message the form or container is released from resizing and the the MapControl will set suppressResize to False. Pass the hwnd of the form or container to the SuppressResizeDrawing method when the form or container is initialized. Passing an hwnd of 0 will stop the MapControl watching the hwnd.

Product Availability

Available with ArcGIS Engine.

Parameters:
suppressResize - The suppressResize (in)
resizeHWnd - The resizeHWnd (in, optional, pass 0 if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDocumentFilename

String getDocumentFilename()
                           throws IOException,
                                  AutomationException
The filename of the last map document loaded into the control.

Description

Returns the DocumentFilename of the last document loaded into the MapControl with the LoadMxFile method. An empty string will be returned if no document is loaded.

Product Availability

Available with ArcGIS Engine.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDocumentFilename

void setDocumentFilename(String pVal)
                         throws IOException,
                                AutomationException
The filename of the last map document loaded into the control.

Product Availability

Available with ArcGIS Engine.

Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDocumentMap

String getDocumentMap()
                      throws IOException,
                             AutomationException
The name of the map that was last loaded into the control from a map document.

Description

Returns the name of the last Map loaded into the MapControl with the LoadMxFile method. An empty string will be returned if no document is loaded.

Product Availability

Available with ArcGIS Engine.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDocumentMap

void setDocumentMap(String pVal)
                    throws IOException,
                           AutomationException
The name of the map that was last loaded into the control from a map document.

Product Availability

Available with ArcGIS Engine.

Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getObject

Object getObject()
                 throws IOException,
                        AutomationException
A property that returns the underlying control. This can be used when the control is inside a wrapper object that has been added by a development environment.

Description

In some development environments it is not possible to query interface directly on the control to other COM interfaces, beacuse the control is contained within a wrapper object. To get the real control use the Object property.

Product Availability

Available with ArcGIS Engine.

Returns:
A reference to another Automation Object (IDispatch)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setShowMapTips

void setShowMapTips(boolean show)
                    throws IOException,
                           AutomationException
Indicates if map tips are shown.

Product Availability

Available with ArcGIS Engine.

Parameters:
show - The show (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isShowMapTips

boolean isShowMapTips()
                      throws IOException,
                             AutomationException
Indicates if map tips are shown.

Description

Determines whether map tips are displayed (if they exist) as the mouse moves over layer features. By default the ShowMapTips property is set to false. To alter the appearance and behaviour of the map tips use the TipStyle and TipDelay properties.

The text for the map tip is taken from the IActiveView::TipText property that examines the data layers to find a layer that can return map tips. Map tips are typically a field value, like a features name. For performace reasons ensure that layers that return map tips have a spatial index.

Product Availability

Available with ArcGIS Engine.

Returns:
The show
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTipStyle

void setTipStyle(int style)
                 throws IOException,
                        AutomationException
The style of map tips.

Product Availability

Available with ArcGIS Engine.

Parameters:
style - A com.esri.arcgis.systemUI.esriTipStyle constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTipStyle

int getTipStyle()
                throws IOException,
                       AutomationException
The style of map tips.

Description

Returns or sets the TipStyle used by the map tips when ShowMapTips is set to true to either solid or transparent. By default the TipStyle is solid.

Product Availability

Available with ArcGIS Engine.

Returns:
A com.esri.arcgis.systemUI.esriTipStyle constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTipDelay

void setTipDelay(int delay)
                 throws IOException,
                        AutomationException
The delay before map tips are shown.

Product Availability

Available with ArcGIS Engine.

Parameters:
delay - The delay (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTipDelay

int getTipDelay()
                throws IOException,
                       AutomationException
The delay before map tips are shown.

Description

Returns or sets the time delay in milliseconds before map tips are displayed. By default TipDelay is 500 milliseconds.

Product Availability

Available with ArcGIS Engine.

Returns:
The delay
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getKeyIntercept

int getKeyIntercept()
                    throws IOException,
                           AutomationException
A property that specifies interception of key strokes that are normally handled by the container. When intercepted the OnKeyDown and OnKeyUp events will be called. This value can be a combined bit mask of esriKeyIntercept enum values.

Description

Returns or sets keys on the keyboard that will be intercepted by the MapControl, triggering the OnKeyDown and OnKeyUp events when pressed. These keys are often hidden from the MapControl by the development environment container. By default the KeyIntercept is set to esriKeyInterceptNone.

Many development environment containers use the up, down, left and right arrow keys to change control focus on a form. These keys can also be useful for navigating around the display. To intercept the arrow keys and the Tab key combine the enum values using a logical OR operation (esriKeyInterceptArrowKeys OR esriKeyInterceptTabKey, which is 1 OR 4 = 5).

Product Availability

Available with ArcGIS Engine.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setKeyIntercept

void setKeyIntercept(int pVal)
                     throws IOException,
                            AutomationException
A property that specifies interception of key strokes that are normally handled by the container. When intercepted the OnKeyDown and OnKeyUp events will be called. This value can be a combined bit mask of esriKeyIntercept enum values.

Product Availability

Available with ArcGIS Engine.

Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.