com.esri.arcgis.controls
Class IMapControl2Proxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.controls.IMapControl2Proxy
All Implemented Interfaces:
IMapControl2, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
IMapControl3Proxy

public class IMapControl2Proxy
extends com.esri.arcgis.interop.Dispatch
implements IMapControl2, java.io.Serializable

Internal use class Proxy for COM Interface 'IMapControl2'. Generated 3/19/2015 1:21:01 PM from 'C:\ArcGIS\COM\esriControls.olb'

Description: 'Provides access to members that control the MapControl.' Generator Options: PromptForTypeLibraries = False ClashPrefix = esri_ LowerCaseMemberNames = True IDispatchOnly = False RetryOnReject = False AwtForOcxs = True ArraysAsObjects = False DontRenameSameMethods = False ImplementConflictingInterfaces = True ReuseMethods = True RenameConflictingInterfaceMethods = True GenBeanInfo = True GenerateJavadoc =

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
static java.lang.Class targetClass
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Fields inherited from interface com.esri.arcgis.controls.IMapControl2
DISPID__501_GET_NAME, DISPID__501_PUT_NAME, DISPID__504_GET_NAME, DISPID__504_PUT_NAME, DISPID__514_GET_NAME, DISPID__514_PUT_NAME, DISPID__515_GET_NAME, DISPID__520_GET_NAME, DISPID__520_PUT_NAME, DISPID__521_GET_NAME, DISPID__521_PUT_NAME, DISPID__522_GET_NAME, DISPID__522_PUTREF_NAME, DISPID__552_NAME, DISPID_1_GET_NAME, DISPID_1_PUTREF_NAME, DISPID_10_GET_NAME, DISPID_10_PUT_NAME, DISPID_13_GET_NAME, DISPID_13_PUT_NAME, DISPID_14_GET_NAME, DISPID_14_PUTREF_NAME, DISPID_15_NAME, DISPID_16_NAME, DISPID_17_NAME, DISPID_18_NAME, DISPID_19_NAME, DISPID_2_GET_NAME, DISPID_20_NAME, DISPID_21_NAME, DISPID_22_NAME, DISPID_23_NAME, DISPID_24_NAME, DISPID_25_NAME, DISPID_26_NAME, DISPID_27_NAME, DISPID_28_NAME, DISPID_29_NAME, DISPID_3_GET_NAME, DISPID_30_NAME, DISPID_31_NAME, DISPID_32_NAME, DISPID_33_NAME, DISPID_34_NAME, DISPID_35_NAME, DISPID_37_GET_NAME, DISPID_37_PUT_NAME, DISPID_38_GET_NAME, DISPID_38_PUT_NAME, DISPID_39_GET_NAME, DISPID_39_PUT_NAME, DISPID_4_GET_NAME, DISPID_40_GET_NAME, DISPID_40_PUTREF_NAME, DISPID_5_GET_NAME, DISPID_5_PUT_NAME, DISPID_6_GET_NAME, DISPID_6_PUT_NAME, DISPID_7_GET_NAME, DISPID_7_PUT_NAME, DISPID_8_PUT_NAME, DISPID_9_GET_NAME, DISPID_9_PUTREF_NAME, IID, IID423dbca0_b7e6_11d5_a9de_00104bb6fc1c
 
Constructor Summary
  IMapControl2Proxy()
          For internal use only
  IMapControl2Proxy(java.lang.Object obj)
           
protected IMapControl2Proxy(java.lang.Object obj, java.lang.String iid)
           
  IMapControl2Proxy(java.lang.String CLSID, java.lang.String host, com.esri.arcgis.interop.AuthInfo authInfo)
           
protected IMapControl2Proxy(java.lang.String CLSID, java.lang.String iid, java.lang.String host, com.esri.arcgis.interop.AuthInfo authInfo)
           
 
Method Summary
 void aboutBox()
          Displays a dialog of information about the MapControl.
 void addLayer(ILayer layer, int toIndex)
          Adds a layer to the Map's collection of layers at the specified index position.
 void addLayerFromFile(java.lang.String lyrPath, int toIndex)
          Loads a layer file and adds it to the Map's collection of layers at the specified index position.
 void addListener(java.lang.String iidStr, java.lang.Object theListener, java.lang.Object theSource)
           
 void addShapeFile(java.lang.String path, java.lang.String fileName)
          Adds a shapefile as a layer to the Map.
 void centerAt(IPoint centerPoint)
          Moves the center of the MapControl to the specified location.
 boolean checkMxFile(java.lang.String fileName)
          Checks the specified filename to see if it is a map document that can be loaded into the MapControl.
 void clearLayers()
          Removes all layers from the Map.
 void deleteLayer(int index)
          Removes a Layer from the Map's collection of layers at the specified index position.
 void drawShape(IGeometry shape, java.lang.Object symbol)
          Draws a geometry shape on the MapControl.
 void drawText(IGeometry pGeometry, java.lang.String text, java.lang.Object pSymbol)
          Draws text along the supplied geometry.
 boolean esri_isEnabled()
          Indicates whether the MapControl can respond to user generated events.
 void esri_setEnabled(boolean enabled)
          Indicates whether the MapControl can respond to user generated events.
 void flashShape(IGeometry pShape, int nFlashes, int flashInterval, java.lang.Object symbol)
          Flashes a shape on the MapControl, duration is in milliseconds.
 void fromMapPoint(IPoint pt, int[] x, int[] y)
          Converts a point on the Map (in map units) to device co-ordinates (typically pixels).
 IActiveView getActiveView()
          The active view of the Map contained by the MapControl.
 int getAppearance()
          The appearance of the MapControl.
 int getBackColor()
          Background color of the MapControl.
 int getBorderStyle()
          The border style of the MapControl.
 ITool getCurrentTool()
          Current active tool for the MapControl.
 IEnvelope getExtent()
          Current extent of the Map in map units.
 IEnvelope getFullExtent()
          Rectangular shape that encloses all features of all layers in the Map.
 int getHWnd()
          Handle to the window associated with the MapControl.
 ILayer getLayer(int index)
          Layer at the supplied index.
 int getLayerCount()
          Number of layers in the Map.
 IMap getMap()
          The Map contained by the MapControl.
 double getMapScale()
          Scale of the map as a representative fraction.
 int getMapUnits()
          The geographical units of the map.
 Picture getMouseIcon()
          Custom mouse icon used if MousePointer is 99.
 int getMousePointer()
          The mouse pointer displayed over the MapControl.
 double getReferenceScale()
          Reference scale of the Map as a representative fraction.
 double getRotation()
          Determines how many degrees the map display is rotated.
 ISpatialReference getSpatialReference()
          Spatial reference of the Map.
 ITrackCancel getTrackCancel()
          The object used by the MapControl to check if drawing has been aborted.
 boolean isOleDropEnabled()
          Indicates if the MapControl will fire events when data is dragged over the control's window.
 boolean isShowScrollbars()
          Indicates whether or not the Map's scrollbars are visible.
 void loadMxFile(java.lang.String mxPath, java.lang.Object mapNameOrIndex, java.lang.Object password)
          Loads the specified Map from the map document into the MapControl.
 void moveLayerTo(int fromIndex, int toIndex)
          Moves a layer within the Map's collection from its current index position to a new index position.
 void pan()
          Tracks the mouse while panning the MapControl.
 IArray readMxMaps(java.lang.String fileName, java.lang.Object password)
          Opens a map document specified by the supplied filename and reads the maps into an array object.
 void refresh(int phase, java.lang.Object layerOrElement, java.lang.Object envelope)
          Redraws the Map, optionally just redraw specified phases or envelope.
 void removeListener(java.lang.String iidStr, java.lang.Object theListener)
           
 void setAppearance(int appearance)
          The appearance of the MapControl.
 void setBackColor(int backColor)
          Background color of the MapControl.
 void setBorderStyle(int borderStyle)
          The border style of the MapControl.
 void setCurrentToolByRef(ITool pTool)
          Current active tool for the MapControl.
 void setExtent(IEnvelope extent)
          Current extent of the Map in map units.
 void setFullExtent(IEnvelope fullExtent)
          Rectangular shape that encloses all features of all layers in the Map.
 void setMapByRef(IMap pMap)
          The Map contained by the MapControl.
 void setMapScale(double mapScale)
          Scale of the map as a representative fraction.
 void setMapUnits(int units)
          The geographical units of the map.
 void setMouseIconByRef(Picture mouseIcon)
          Custom mouse icon used if MousePointer is 99.
 void setMousePointer(int mousePointer)
          The mouse pointer displayed over the MapControl.
 void setOleDropEnabled(boolean enabled)
          Indicates if the MapControl will fire events when data is dragged over the control's window.
 void setReferenceScale(double referenceScale)
          Reference scale of the Map as a representative fraction.
 void setRotation(double rotation)
          Determines how many degrees the map display is rotated.
 void setShowScrollbars(boolean showScrollbars)
          Indicates whether or not the Map's scrollbars are visible.
 void setSpatialReferenceByRef(ISpatialReference spRef)
          Spatial reference of the Map.
 void setTrackCancelByRef(ITrackCancel ppTrackCancel)
          The object used by the MapControl to check if drawing has been aborted.
 void setVisibleRegion(IGeometry rhs1)
          The geometry specifying the visible region of the Map.
 IPoint toMapPoint(int x, int y)
          Converts a point in device co-ordinates (typically pixels) to a point on the Map (in map units).
 IGeometry trackCircle()
          Rubber-bands a circle on the MapControl.
 IGeometry trackLine()
          Rubber-bands a polyline on the MapControl.
 IGeometry trackPolygon()
          Rubber-bands a polygon on the MapControl.
 IEnvelope trackRectangle()
          Rubber-bands a rectangle on the MapControl.
 
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

targetClass

public static final java.lang.Class targetClass

noncastable

public boolean noncastable
Constructor Detail

IMapControl2Proxy

public IMapControl2Proxy(java.lang.String CLSID,
                         java.lang.String host,
                         com.esri.arcgis.interop.AuthInfo authInfo)
                  throws java.net.UnknownHostException,
                         java.io.IOException
Throws:
java.net.UnknownHostException
java.io.IOException

IMapControl2Proxy

public IMapControl2Proxy()
For internal use only


IMapControl2Proxy

public IMapControl2Proxy(java.lang.Object obj)
                  throws java.io.IOException
Throws:
java.io.IOException

IMapControl2Proxy

protected IMapControl2Proxy(java.lang.Object obj,
                            java.lang.String iid)
                     throws java.io.IOException
Throws:
java.io.IOException

IMapControl2Proxy

protected IMapControl2Proxy(java.lang.String CLSID,
                            java.lang.String iid,
                            java.lang.String host,
                            com.esri.arcgis.interop.AuthInfo authInfo)
                     throws java.io.IOException
Throws:
java.io.IOException
Method Detail

addListener

public void addListener(java.lang.String iidStr,
                        java.lang.Object theListener,
                        java.lang.Object theSource)
                 throws java.io.IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
java.io.IOException

removeListener

public void removeListener(java.lang.String iidStr,
                           java.lang.Object theListener)
                    throws java.io.IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
java.io.IOException

getHWnd

public int getHWnd()
            throws java.io.IOException,
                   AutomationException
Handle to the window associated with the MapControl.

Specified by:
getHWnd in interface IMapControl2
Returns:
The hWnd
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBackColor

public void setBackColor(int backColor)
                  throws java.io.IOException,
                         AutomationException
Background color of the MapControl.

Specified by:
setBackColor in interface IMapControl2
Parameters:
backColor - The backColor (A COM typedef) (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBackColor

public int getBackColor()
                 throws java.io.IOException,
                        AutomationException
Background color of the MapControl.

Specified by:
getBackColor in interface IMapControl2
Returns:
The backColor (A COM typedef)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMousePointer

public void setMousePointer(int mousePointer)
                     throws java.io.IOException,
                            AutomationException
The mouse pointer displayed over the MapControl.

Specified by:
setMousePointer in interface IMapControl2
Parameters:
mousePointer - A com.esri.arcgis.controls.esriControlsMousePointer constant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMousePointer

public int getMousePointer()
                    throws java.io.IOException,
                           AutomationException
The mouse pointer displayed over the MapControl.

Specified by:
getMousePointer in interface IMapControl2
Returns:
A com.esri.arcgis.controls.esriControlsMousePointer constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMouseIconByRef

public void setMouseIconByRef(Picture mouseIcon)
                       throws java.io.IOException,
                              AutomationException
Custom mouse icon used if MousePointer is 99.

Specified by:
setMouseIconByRef in interface IMapControl2
Parameters:
mouseIcon - A reference to a com.esri.arcgis.support.ms.stdole.Picture (A com.esri.arcgis.support.ms.stdole.Picture COM typedef) (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMouseIcon

public Picture getMouseIcon()
                     throws java.io.IOException,
                            AutomationException
Custom mouse icon used if MousePointer is 99.

Specified by:
getMouseIcon in interface IMapControl2
Returns:
A reference to a com.esri.arcgis.support.ms.stdole.Picture (A com.esri.arcgis.support.ms.stdole.Picture COM typedef)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBorderStyle

public void setBorderStyle(int borderStyle)
                    throws java.io.IOException,
                           AutomationException
The border style of the MapControl.

Specified by:
setBorderStyle in interface IMapControl2
Parameters:
borderStyle - A com.esri.arcgis.controls.esriControlsBorderStyle constant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBorderStyle

public int getBorderStyle()
                   throws java.io.IOException,
                          AutomationException
The border style of the MapControl.

Specified by:
getBorderStyle in interface IMapControl2
Returns:
A com.esri.arcgis.controls.esriControlsBorderStyle constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_setEnabled

public void esri_setEnabled(boolean enabled)
                     throws java.io.IOException,
                            AutomationException
Indicates whether the MapControl can respond to user generated events.

Specified by:
esri_setEnabled in interface IMapControl2
Parameters:
enabled - The enabled (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_isEnabled

public boolean esri_isEnabled()
                       throws java.io.IOException,
                              AutomationException
Indicates whether the MapControl can respond to user generated events.

Specified by:
esri_isEnabled in interface IMapControl2
Returns:
The enabled
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAppearance

public void setAppearance(int appearance)
                   throws java.io.IOException,
                          AutomationException
The appearance of the MapControl.

Specified by:
setAppearance in interface IMapControl2
Parameters:
appearance - A com.esri.arcgis.controls.esriControlsAppearance constant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAppearance

public int getAppearance()
                  throws java.io.IOException,
                         AutomationException
The appearance of the MapControl.

Specified by:
getAppearance in interface IMapControl2
Returns:
A com.esri.arcgis.controls.esriControlsAppearance constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

aboutBox

public void aboutBox()
              throws java.io.IOException,
                     AutomationException
Displays a dialog of information about the MapControl.

Specified by:
aboutBox in interface IMapControl2
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMapByRef

public void setMapByRef(IMap pMap)
                 throws java.io.IOException,
                        AutomationException
The Map contained by the MapControl.

Specified by:
setMapByRef in interface IMapControl2
Parameters:
pMap - A reference to a com.esri.arcgis.carto.IMap (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMap

public IMap getMap()
            throws java.io.IOException,
                   AutomationException
The Map contained by the MapControl.

Specified by:
getMap in interface IMapControl2
Returns:
A reference to a com.esri.arcgis.carto.IMap
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getActiveView

public IActiveView getActiveView()
                          throws java.io.IOException,
                                 AutomationException
The active view of the Map contained by the MapControl.

Specified by:
getActiveView in interface IMapControl2
Returns:
A reference to a com.esri.arcgis.carto.IActiveView
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayerCount

public int getLayerCount()
                  throws java.io.IOException,
                         AutomationException
Number of layers in the Map.

Specified by:
getLayerCount in interface IMapControl2
Returns:
The numLayers
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayer

public ILayer getLayer(int index)
                throws java.io.IOException,
                       AutomationException
Layer at the supplied index.

Specified by:
getLayer in interface IMapControl2
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.carto.ILayer
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtent

public IEnvelope getExtent()
                    throws java.io.IOException,
                           AutomationException
Current extent of the Map in map units.

Specified by:
getExtent in interface IMapControl2
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setExtent

public void setExtent(IEnvelope extent)
               throws java.io.IOException,
                      AutomationException
Current extent of the Map in map units.

Specified by:
setExtent in interface IMapControl2
Parameters:
extent - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFullExtent

public IEnvelope getFullExtent()
                        throws java.io.IOException,
                               AutomationException
Rectangular shape that encloses all features of all layers in the Map.

Specified by:
getFullExtent in interface IMapControl2
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFullExtent

public void setFullExtent(IEnvelope fullExtent)
                   throws java.io.IOException,
                          AutomationException
Rectangular shape that encloses all features of all layers in the Map.

Specified by:
setFullExtent in interface IMapControl2
Parameters:
fullExtent - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isShowScrollbars

public boolean isShowScrollbars()
                         throws java.io.IOException,
                                AutomationException
Indicates whether or not the Map's scrollbars are visible.

Specified by:
isShowScrollbars in interface IMapControl2
Returns:
The showScrollbars
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setShowScrollbars

public void setShowScrollbars(boolean showScrollbars)
                       throws java.io.IOException,
                              AutomationException
Indicates whether or not the Map's scrollbars are visible.

Specified by:
setShowScrollbars in interface IMapControl2
Parameters:
showScrollbars - The showScrollbars (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setVisibleRegion

public void setVisibleRegion(IGeometry rhs1)
                      throws java.io.IOException,
                             AutomationException
The geometry specifying the visible region of the Map.

Specified by:
setVisibleRegion in interface IMapControl2
Parameters:
rhs1 - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpatialReference

public ISpatialReference getSpatialReference()
                                      throws java.io.IOException,
                                             AutomationException
Spatial reference of the Map.

Specified by:
getSpatialReference in interface IMapControl2
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSpatialReferenceByRef

public void setSpatialReferenceByRef(ISpatialReference spRef)
                              throws java.io.IOException,
                                     AutomationException
Spatial reference of the Map.

Specified by:
setSpatialReferenceByRef in interface IMapControl2
Parameters:
spRef - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getReferenceScale

public double getReferenceScale()
                         throws java.io.IOException,
                                AutomationException
Reference scale of the Map as a representative fraction.

Specified by:
getReferenceScale in interface IMapControl2
Returns:
The referenceScale
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setReferenceScale

public void setReferenceScale(double referenceScale)
                       throws java.io.IOException,
                              AutomationException
Reference scale of the Map as a representative fraction.

Specified by:
setReferenceScale in interface IMapControl2
Parameters:
referenceScale - The referenceScale (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapScale

public double getMapScale()
                   throws java.io.IOException,
                          AutomationException
Scale of the map as a representative fraction.

Specified by:
getMapScale in interface IMapControl2
Returns:
The mapScale
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMapScale

public void setMapScale(double mapScale)
                 throws java.io.IOException,
                        AutomationException
Scale of the map as a representative fraction.

Specified by:
setMapScale in interface IMapControl2
Parameters:
mapScale - The mapScale (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentTool

public ITool getCurrentTool()
                     throws java.io.IOException,
                            AutomationException
Current active tool for the MapControl. Set to nothing to clear the tool.

Specified by:
getCurrentTool in interface IMapControl2
Returns:
A reference to a com.esri.arcgis.systemUI.ITool
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCurrentToolByRef

public void setCurrentToolByRef(ITool pTool)
                         throws java.io.IOException,
                                AutomationException
Current active tool for the MapControl. Set to nothing to clear the tool.

Specified by:
setCurrentToolByRef in interface IMapControl2
Parameters:
pTool - A reference to a com.esri.arcgis.systemUI.ITool (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addLayer

public void addLayer(ILayer layer,
                     int toIndex)
              throws java.io.IOException,
                     AutomationException
Adds a layer to the Map's collection of layers at the specified index position.

Specified by:
addLayer in interface IMapControl2
Parameters:
layer - A reference to a com.esri.arcgis.carto.ILayer (in)
toIndex - The toIndex (in, optional, pass 0 if not required)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addLayerFromFile

public void addLayerFromFile(java.lang.String lyrPath,
                             int toIndex)
                      throws java.io.IOException,
                             AutomationException
Loads a layer file and adds it to the Map's collection of layers at the specified index position.

Specified by:
addLayerFromFile in interface IMapControl2
Parameters:
lyrPath - The lyrPath (in)
toIndex - The toIndex (in, optional, pass 0 if not required)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearLayers

public void clearLayers()
                 throws java.io.IOException,
                        AutomationException
Removes all layers from the Map.

Specified by:
clearLayers in interface IMapControl2
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteLayer

public void deleteLayer(int index)
                 throws java.io.IOException,
                        AutomationException
Removes a Layer from the Map's collection of layers at the specified index position.

Specified by:
deleteLayer in interface IMapControl2
Parameters:
index - The index (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

moveLayerTo

public void moveLayerTo(int fromIndex,
                        int toIndex)
                 throws java.io.IOException,
                        AutomationException
Moves a layer within the Map's collection from its current index position to a new index position.

Specified by:
moveLayerTo in interface IMapControl2
Parameters:
fromIndex - The fromIndex (in)
toIndex - The toIndex (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

loadMxFile

public void loadMxFile(java.lang.String mxPath,
                       java.lang.Object mapNameOrIndex,
                       java.lang.Object password)
                throws java.io.IOException,
                       AutomationException
Loads the specified Map from the map document into the MapControl. The Map can be an index or a name, if it is not supplied the focus map is used.

Specified by:
loadMxFile in interface IMapControl2
Parameters:
mxPath - The mxPath (in)
mapNameOrIndex - A Variant (in, optional, pass null if not required)
password - A Variant (in, optional, pass null if not required)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

refresh

public void refresh(int phase,
                    java.lang.Object layerOrElement,
                    java.lang.Object envelope)
             throws java.io.IOException,
                    AutomationException
Redraws the Map, optionally just redraw specified phases or envelope.

Specified by:
refresh in interface IMapControl2
Parameters:
phase - A com.esri.arcgis.carto.esriViewDrawPhase constant (in, optional, pass 65535 if not required)
layerOrElement - A Variant (in, optional, pass null if not required)
envelope - A Variant (in, optional, pass null if not required)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

pan

public void pan()
         throws java.io.IOException,
                AutomationException
Tracks the mouse while panning the MapControl.

Specified by:
pan in interface IMapControl2
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

centerAt

public void centerAt(IPoint centerPoint)
              throws java.io.IOException,
                     AutomationException
Moves the center of the MapControl to the specified location.

Specified by:
centerAt in interface IMapControl2
Parameters:
centerPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

trackRectangle

public IEnvelope trackRectangle()
                         throws java.io.IOException,
                                AutomationException
Rubber-bands a rectangle on the MapControl.

Specified by:
trackRectangle in interface IMapControl2
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

trackPolygon

public IGeometry trackPolygon()
                       throws java.io.IOException,
                              AutomationException
Rubber-bands a polygon on the MapControl.

Specified by:
trackPolygon in interface IMapControl2
Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

trackLine

public IGeometry trackLine()
                    throws java.io.IOException,
                           AutomationException
Rubber-bands a polyline on the MapControl.

Specified by:
trackLine in interface IMapControl2
Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

trackCircle

public IGeometry trackCircle()
                      throws java.io.IOException,
                             AutomationException
Rubber-bands a circle on the MapControl.

Specified by:
trackCircle in interface IMapControl2
Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

drawShape

public void drawShape(IGeometry shape,
                      java.lang.Object symbol)
               throws java.io.IOException,
                      AutomationException
Draws a geometry shape on the MapControl.

Specified by:
drawShape in interface IMapControl2
Parameters:
shape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
symbol - A Variant (in, optional, pass null if not required)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

flashShape

public void flashShape(IGeometry pShape,
                       int nFlashes,
                       int flashInterval,
                       java.lang.Object symbol)
                throws java.io.IOException,
                       AutomationException
Flashes a shape on the MapControl, duration is in milliseconds.

Specified by:
flashShape in interface IMapControl2
Parameters:
pShape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
nFlashes - The nFlashes (in, optional, pass 3 if not required)
flashInterval - The flashInterval (in, optional, pass 300 if not required)
symbol - A Variant (in, optional, pass null if not required)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

fromMapPoint

public void fromMapPoint(IPoint pt,
                         int[] x,
                         int[] y)
                  throws java.io.IOException,
                         AutomationException
Converts a point on the Map (in map units) to device co-ordinates (typically pixels).

Specified by:
fromMapPoint in interface IMapControl2
Parameters:
pt - A reference to a com.esri.arcgis.geometry.IPoint (in)
x - The x (in/out: use single element array)
y - The y (in/out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

toMapPoint

public IPoint toMapPoint(int x,
                         int y)
                  throws java.io.IOException,
                         AutomationException
Converts a point in device co-ordinates (typically pixels) to a point on the Map (in map units).

Specified by:
toMapPoint in interface IMapControl2
Parameters:
x - The x (in)
y - The y (in)
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addShapeFile

public void addShapeFile(java.lang.String path,
                         java.lang.String fileName)
                  throws java.io.IOException,
                         AutomationException
Adds a shapefile as a layer to the Map.

Specified by:
addShapeFile in interface IMapControl2
Parameters:
path - The path (in)
fileName - The fileName (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

drawText

public void drawText(IGeometry pGeometry,
                     java.lang.String text,
                     java.lang.Object pSymbol)
              throws java.io.IOException,
                     AutomationException
Draws text along the supplied geometry.

Specified by:
drawText in interface IMapControl2
Parameters:
pGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
text - The text (in)
pSymbol - A Variant (in, optional, pass null if not required)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

checkMxFile

public boolean checkMxFile(java.lang.String fileName)
                    throws java.io.IOException,
                           AutomationException
Checks the specified filename to see if it is a map document that can be loaded into the MapControl.

Specified by:
checkMxFile in interface IMapControl2
Parameters:
fileName - The fileName (in)
Returns:
The result
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

readMxMaps

public IArray readMxMaps(java.lang.String fileName,
                         java.lang.Object password)
                  throws java.io.IOException,
                         AutomationException
Opens a map document specified by the supplied filename and reads the maps into an array object.

Specified by:
readMxMaps in interface IMapControl2
Parameters:
fileName - The fileName (in)
password - A Variant (in, optional, pass null if not required)
Returns:
A reference to a com.esri.arcgis.system.IArray
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setOleDropEnabled

public void setOleDropEnabled(boolean enabled)
                       throws java.io.IOException,
                              AutomationException
Indicates if the MapControl will fire events when data is dragged over the control's window.

Specified by:
setOleDropEnabled in interface IMapControl2
Parameters:
enabled - The enabled (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isOleDropEnabled

public boolean isOleDropEnabled()
                         throws java.io.IOException,
                                AutomationException
Indicates if the MapControl will fire events when data is dragged over the control's window.

Specified by:
isOleDropEnabled in interface IMapControl2
Returns:
The enabled
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setRotation

public void setRotation(double rotation)
                 throws java.io.IOException,
                        AutomationException
Determines how many degrees the map display is rotated.

Specified by:
setRotation in interface IMapControl2
Parameters:
rotation - The rotation (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRotation

public double getRotation()
                   throws java.io.IOException,
                          AutomationException
Determines how many degrees the map display is rotated.

Specified by:
getRotation in interface IMapControl2
Returns:
The rotation
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapUnits

public int getMapUnits()
                throws java.io.IOException,
                       AutomationException
The geographical units of the map.

Specified by:
getMapUnits in interface IMapControl2
Returns:
A com.esri.arcgis.system.esriUnits constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMapUnits

public void setMapUnits(int units)
                 throws java.io.IOException,
                        AutomationException
The geographical units of the map.

Specified by:
setMapUnits in interface IMapControl2
Parameters:
units - A com.esri.arcgis.system.esriUnits constant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTrackCancel

public ITrackCancel getTrackCancel()
                            throws java.io.IOException,
                                   AutomationException
The object used by the MapControl to check if drawing has been aborted.

Specified by:
getTrackCancel in interface IMapControl2
Returns:
A reference to a com.esri.arcgis.system.ITrackCancel
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTrackCancelByRef

public void setTrackCancelByRef(ITrackCancel ppTrackCancel)
                         throws java.io.IOException,
                                AutomationException
The object used by the MapControl to check if drawing has been aborted.

Specified by:
setTrackCancelByRef in interface IMapControl2
Parameters:
ppTrackCancel - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.