|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent com.esri.arcgis.beans.map.MapBean
public class MapBean
The MapBean
is a wrapper class of MapControl
to
facilitate the use of MapControl
at the design time. Users could access
the actual control by getMapControl
method.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static String |
LAYER_SEPARATER
|
protected MapControl |
m_mapControl
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
MapBean()
Default constructor. |
Method Summary | |
---|---|
void |
aboutBox()
Displays a dialog of information about the MapControl. |
void |
addIMapControlEvents2Listener(IMapControlEvents2Adapter theListener)
|
void |
addITOCBuddyEventsListener(ITOCBuddyEventsAdapter theListener)
|
void |
addLayer(ILayer layer,
int toIndex)
Adds a layer to the Map's collection of layers at the specified index position. |
void |
addLayerFromFile(String lyrPath,
int toIndex)
Loads a layer file and adds it to the Map's collection of layers at the specified index position. |
void |
addShapeFile(String path,
String name)
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(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,
Object symbol)
Draws a geometry shape on the MapControl. |
void |
drawText(IGeometry pGeometry,
String text,
Object pSymbol)
Draws text along the supplied geometry. |
void |
enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
enumConnectionPoints |
boolean |
esri_isEnabled()
Indicates whether the MapControl can respond to user generated events. |
void |
esri_setEnabled(boolean rhs1)
Indicates whether the MapControl can respond to user generated events. |
void |
findConnectionPoint(GUID riid,
IConnectionPoint[] ppCP)
findConnectionPoint |
void |
flashShape(IGeometry pShape,
int nFlashes,
int flashInterval,
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. |
Object |
getBuddyControl()
returns com.esri.arcgis.beans.ui.BuddyControl object. |
void |
getClassID(GUID[] gUIDArray)
getClassID |
ITool |
getCurrentTool()
Current active tool for the MapControl. |
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. |
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. |
com.esri.arcgis.interop.Dispatch |
getJintegraDispatch()
|
int |
getKeyIntercept()
A property that specifies interception of key strokes that are normally handled by the container. |
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. |
MapControl |
getMapControl()
Returns the actual 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. |
Object |
getObject()
A property that returns the underlying control. |
IPageLayout |
getPageLayout()
The PageLayout object. |
double |
getReferenceScale()
Reference scale of the Map as a representative fraction. |
double |
getRotation()
Determines how many degrees the map display is rotated. |
double |
getScale(IBasicMap pBasicMap)
Returns the scale of the supplied BasicMap, this allows for objects that do not support IMap. |
void |
getSizeMax(_ULARGE_INTEGER[] pCbSize)
getSizeMax |
ISpatialReference |
getSpatialReference()
Spatial reference of the Map. |
int |
getTipDelay()
The delay before map tips are shown. |
int |
getTipStyle()
The style of map tips. |
ITrackCancel |
getTrackCancel()
The object used by the MapControl to check if drawing has been aborted. |
void |
initNew()
initNew |
void |
interfaceSupportsErrorInfo(GUID gUID)
interfaceSupportsErrorInfo |
boolean |
isAutoKeyboardScrolling()
Indicates whether keyboard scrolling is enabled. |
boolean |
isAutoMouseWheel()
Indicates whether the mouse wheel is enabled. |
void |
isDirty()
isDirty |
boolean |
isOleDropEnabled()
Indicates if the MapControl will fire events when data is dragged over the control's window. |
boolean |
isShowMapTips()
Indicates if map tips are shown. |
boolean |
isShowScrollbars()
Indicates whether or not the Map's scrollbars are visible. |
void |
load(IStream pStm)
load |
void |
loadMxFile(String mxPath,
Object mapNameOrIndex,
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 |
paint(Graphics g)
Paints this component in desing tome |
void |
pan()
Tracks the mouse while panning the MapControl. |
IArray |
readMxMaps(String fileName,
Object password)
Opens a map document specified by the supplied filename and reads the maps into an array object. |
void |
refresh(int phase,
Object layerOrElement,
Object envelope)
Redraws the Map, optionally just redraw specified phases or envelope. |
void |
release()
|
void |
removeIMapControlEvents2Listener(IMapControlEvents2Adapter theListener)
|
void |
removeITOCBuddyEventsListener(ITOCBuddyEventsAdapter theListener)
|
void |
save(IStream pStm,
int fClearDirty)
save |
void |
setAppearance(int appearance)
The appearance of the MapControl. |
void |
setAutoKeyboardScrolling(boolean rhs1)
Indicates whether keyboard scrolling is enabled. |
void |
setAutoMouseWheel(boolean rhs1)
Indicates whether the mouse wheel is enabled. |
void |
setBackColor(int rhs1)
Background color of the MapControl. |
void |
setBorderStyle(int rhs1)
The border style of the MapControl. |
void |
setCurrentToolByRef(ITool rhs1)
Current active tool for the MapControl. |
void |
setCustomProperty(Object rhs1)
A property to associate data with a control. |
void |
setDocumentFilename(String filename)
The filename of the last map document loaded into the control. |
void |
setDocumentMap(String map)
The name of the map that was last loaded into the control from a map document. |
void |
setExtent(IEnvelope rhs1)
Current extent of the Map in map units. |
void |
setFullExtent(IEnvelope rhs1)
Rectangular shape that encloses all features of all layers in the Map. |
void |
setKeyIntercept(int key)
A property that specifies interception of key strokes that are normally handled by the container. |
void |
setLayout(LayoutManager layout)
Overrides the setLayout method of super class. |
void |
setMapByRef(IMap rhs1)
The Map contained by the MapControl. |
void |
setMapScale(double s)
Scale of the map as a representative fraction. |
void |
setMapUnits(int i)
The geographical units of the map. |
void |
setMouseIconByRef(Picture picture)
Custom mouse icon used if MousePointer is 99. |
void |
setMousePointer(int pointer)
The mouse pointer displayed over the MapControl. |
void |
setOleDropEnabled(boolean rhs1)
Indicates if the MapControl will fire events when data is dragged over the control's window. |
void |
setReferenceScale(double d)
Reference scale of the Map as a representative fraction. |
void |
setRotation(double rotate)
Determines how many degrees the map display is rotated. |
void |
setShowMapTips(boolean tips)
Indicates if map tips are shown. |
void |
setShowScrollbars(boolean rhs1)
Indicates whether or not the Map's scrollbars are visible. |
void |
setSpatialReferenceByRef(ISpatialReference rhs1)
Spatial reference of the Map. |
void |
setTipDelay(int rhs1)
The delay before map tips are shown. |
void |
setTipStyle(int style)
The style of map tips. |
void |
setTrackCancelByRef(ITrackCancel rhs1)
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. |
void |
suppressResizeDrawing(boolean suppressResize,
int resizeHWnd)
Suppress full redraw of control during resize operations. |
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected MapControl m_mapControl
public static final String LAYER_SEPARATER
Constructor Detail |
---|
public MapBean()
Method Detail |
---|
public MapControl getMapControl()
public Object getBuddyControl()
getBuddyControl
in interface BuddyControl
public void setLayout(LayoutManager layout)
setLayout
method of super class.
setLayout
in class Container
layout
- LayoutManager - a LayoutManager object.public void paint(Graphics g)
paint
in class JComponent
g
- the graphics context to use for paintingpublic void addShapeFile(String path, String name) throws IOException
When a shapefile is added to the MapControl's layer collection it is added to the beginning or top of the collection with an index of 0. The numeric index of any other layers in the layer collection increments by one.
The Layer at the beginning or top of the collection with an index of 0 will be drawn last, whilst the Layer at the bottom of the collection will be drawn first.
Use the MoveLayerTo method to change the position of a Layer within the layer collection.
addShapeFile
in interface IMapControl2
addShapeFile
in interface IMapControlDefault
path
- The path (in)fileName
- The fileName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.addLayer(com.esri.arcgis.carto.ILayer, int)
,
IMapControl2.addLayerFromFile(String, int)
,
IMapControl3
,
IMapControl4
public void setDocumentMap(String map) throws IOException
setDocumentMap
in interface IMapControl3
setDocumentMap
in interface IMapControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getDocumentMap() throws IOException
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.
getDocumentMap
in interface IMapControl3
getDocumentMap
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setRotation(double rotate) throws IOException
setRotation
in interface IMapControl2
setRotation
in interface IMapControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getRotation() throws IOException
This property is a shortcut to IDisplayTransformation::Rotation. The Rotation property controls the rotation of the display, and so the angle data appears inside the Map. The angle of the rotation is measured in degrees. Positive numbers rotate the display counter clockwise and negative numbers clockwise.
getRotation
in interface IMapControl2
getRotation
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMapUnits(int i) throws IOException
setMapUnits
in interface IMapControl2
setMapUnits
in interface IMapControlDefault
rhs1
- A com.esri.arcgis.system.esriUnits constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getMapUnits() throws IOException
This property is a shortcut to IMap::MapUnits.
getMapUnits
in interface IMapControl2
getMapUnits
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.getMapScale()
,
IMapControl2.getReferenceScale()
,
IMapControl2.getSpatialReference()
,
IMapControl2.getMap()
,
IMapControl3
,
IMapControl4
public void setMapScale(double s) throws IOException
setMapScale
in interface IMapControl2
setMapScale
in interface IMapControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getMapScale() throws IOException
This property is a shortcut to IMap::MapScale which itself is a shortcut to IDisplayTransformation::ScaleRatio.
MapScale is the relationship between the dimensions of features on a map and the geographic objects they represent on the earth, commonly expressed as a fraction or a ratio. A MapScale of 1/100,000 or 1:100,000 means that one unit of measure on the map equals 100,000 of the same units on the earth.
Some common scales are as follows:
getMapScale
in interface IMapControl2
getMapScale
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.getReferenceScale()
,
IMapControl2.getSpatialReference()
,
IMapControl2.getMapUnits()
,
IMapControl2.getMap()
,
IMapControl3
,
IMapControl4
public void setReferenceScale(double d) throws IOException
setReferenceScale
in interface IMapControl2
setReferenceScale
in interface IMapControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getReferenceScale() throws IOException
This property is a shortcut to IMap::ReferenceScale and is the scale to which all symbol and text sizes used in the Map will be made relative.
A ReferenceScale set to 0 indicates that no ReferenceScale is set and is the default. When no ReferenceScale is set, the size of any symbols or text on the Map remains the same irrespective of MapScale. When a reference scale is set, the size of any symbols or text on the map changes as the MapScale changes. For example, text labels will get larger if you zoom in to a scale larger than the ReferenceScale and smaller if you zoom out to a scale smaller than the ReferenceScale.
getReferenceScale
in interface IMapControl2
getReferenceScale
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.getMapScale()
,
IMapControl2.getSpatialReference()
,
IMapControl2.getMapUnits()
,
IMapControl2.getMap()
,
IMapControl3
,
IMapControl4
public int getAppearance() throws IOException
Returns or sets the paint style of a MapControl to either Flat or 3D. By default the appearance is flat.
getAppearance
in interface IMapControl2
getAppearance
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAppearance(int appearance) throws IOException
setAppearance
in interface IMapControl2
setAppearance
in interface IMapControlDefault
rhs1
- A com.esri.arcgis.controls.esriControlsAppearance constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getBorderStyle() throws IOException
Returns or sets the border style of a MapControl. By default a border is drawn.
getBorderStyle
in interface IMapControl2
getBorderStyle
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setBorderStyle(int rhs1) throws IOException
setBorderStyle
in interface IMapControl2
setBorderStyle
in interface IMapControlDefault
rhs1
- A com.esri.arcgis.controls.esriControlsBorderStyle constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getMousePointer() throws IOException
Use this property when you want to indicate changes in functionality as the mouse pointer passes over the MapControl. The esriPointerArrowHourglass setting (11) is useful for indicating that the user should wait for a process or operation to finish.
getMousePointer
in interface IMapControl2
getMousePointer
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.getMouseIcon()
,
IMapControl3
,
IMapControl4
public void setMousePointer(int pointer) throws IOException
setMousePointer
in interface IMapControl2
setMousePointer
in interface IMapControlDefault
rhs1
- A com.esri.arcgis.controls.esriControlsMousePointer constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getTipStyle() throws IOException
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.
getTipStyle
in interface IMapControl3
getTipStyle
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTipStyle(int style) throws IOException
setTipStyle
in interface IMapControl3
setTipStyle
in interface IMapControlDefault
rhs1
- A com.esri.arcgis.systemUI.esriTipStyle constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean esri_isEnabled() throws IOException
esri_isEnabled
in interface IMapControl2
esri_isEnabled
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void esri_setEnabled(boolean rhs1) throws IOException
esri_setEnabled
in interface IMapControl2
esri_setEnabled
in interface IMapControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isShowScrollbars() throws IOException
If ShowScrollbars is true, the MapControl's internal scrollbars will appear when the Extent property is less than the FullExtent property.
isShowScrollbars
in interface IMapControl2
isShowScrollbars
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setShowScrollbars(boolean rhs1) throws IOException
setShowScrollbars
in interface IMapControl2
setShowScrollbars
in interface IMapControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isOleDropEnabled() throws IOException
Indicates if the MapControl will accept data dragged from another application and fire the IMapControlEvents2::OnOleDrop event. By default the OleDropEnabled property is set to false.
isOleDropEnabled
in interface IMapControl2
isOleDropEnabled
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setOleDropEnabled(boolean rhs1) throws IOException
setOleDropEnabled
in interface IMapControl2
setOleDropEnabled
in interface IMapControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setShowMapTips(boolean tips) throws IOException
setShowMapTips
in interface IMapControl3
setShowMapTips
in interface IMapControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isShowMapTips() throws IOException
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.
isShowMapTips
in interface IMapControl3
isShowMapTips
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getKeyIntercept() throws IOException
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).
getKeyIntercept
in interface IMapControl3
getKeyIntercept
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setKeyIntercept(int key) throws IOException
setKeyIntercept
in interface IMapControl3
setKeyIntercept
in interface IMapControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getBackColor() throws IOException
Returns or sets the Background Color of the MapControl. Internally the OLE_Color is stored as a long integer where the value may be calculated for any RGB combination as follows:
OLE_Color = (Red) + (Green * 256) + (Blue * 256 * 256)
Where Red, Green and Blue are Long Integers within the range 0 - 255.
getBackColor
in interface IMapControl2
getBackColor
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setBackColor(int rhs1) throws IOException
setBackColor
in interface IMapControl2
setBackColor
in interface IMapControlDefault
rhs1
- The rhs1 (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDocumentFilename(String filename) throws IOException
setDocumentFilename
in interface IMapControl3
setDocumentFilename
in interface IMapControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getDocumentFilename() throws IOException
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.
getDocumentFilename
in interface IMapControl3
getDocumentFilename
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addIMapControlEvents2Listener(IMapControlEvents2Adapter theListener) throws IOException
IOException
public void removeIMapControlEvents2Listener(IMapControlEvents2Adapter theListener) throws IOException
IOException
public void addITOCBuddyEventsListener(ITOCBuddyEventsAdapter theListener) throws IOException
IOException
public void removeITOCBuddyEventsListener(ITOCBuddyEventsAdapter theListener) throws IOException
IOException
public void setMapByRef(IMap rhs1) throws IOException, AutomationException
setMapByRef
in interface IMapControl2
setMapByRef
in interface IMapControlDefault
rhs1
- A reference to a com.esri.arcgis.carto.IMap (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IMap getMap() throws IOException, AutomationException
This is the Map CoClass contained within the MapControl. If the Map is replaced the IMapControlEvents2::OnMapReplaced event is triggered.
getMap
in interface IMxdContents
getMap
in interface IMapControl2
getMap
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.getMapScale()
,
IMapControl2.getReferenceScale()
,
IMapControl2.getSpatialReference()
,
IMapControl2.getMapUnits()
,
IMapControl3
,
IMapControl4
public IActiveView getActiveView() throws IOException, AutomationException
This is the ActiveView on the Map contained within the MapControl.
getActiveView
in interface IMxdContents
getActiveView
in interface IMapControl2
getActiveView
in interface IMapControlDefault
getActiveView
in interface ITOCBuddy
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getLayerCount() throws IOException, AutomationException
Returns the number of layers in the Map that implement IDataLayer. This does not include ICompositeLayer objects.
getLayerCount
in interface IMapControl2
getLayerCount
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.clearLayers()
,
IMapControl2.moveLayerTo(int, int)
,
IMapControl2.getLayer(int)
,
IMapControl3
,
IMapControl4
,
IMapControl2.deleteLayer(int)
public ILayer getLayer(int index) throws IOException, AutomationException
getLayer
in interface IMapControl2
getLayer
in interface IMapControlDefault
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getExtent() throws IOException, AutomationException
Returns or sets a new envelope which is represents the visible extent of the Map. Setting the Extent property will automatically cause the MapControl to refresh its display.
getExtent
in interface IMapControl2
getExtent
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getObject() throws IOException, AutomationException
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.
getObject
in interface IMapControl3
getObject
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getHWnd() throws IOException, AutomationException
The operating environment identifies each window, form and control in an application by assigning it a handle, or hWnd. Many ArcObjects methods and Windows API calls require the hWnd as an argument.
getHWnd
in interface IMapControl2
getHWnd
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setExtent(IEnvelope rhs1) throws IOException, AutomationException
setExtent
in interface IMapControl2
setExtent
in interface IMapControlDefault
rhs1
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getFullExtent() throws IOException, AutomationException
Returns or sets a new envelope object representing the full extent of all the data layers in the Map. The FullExtent property is a shortcut to IDisplayTransformation::Bounds. Setting the FullExtent triggers the IMapControlEvents2::OnFullExtentUpdated event.
getFullExtent
in interface IMapControl2
getFullExtent
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setFullExtent(IEnvelope rhs1) throws IOException, AutomationException
setFullExtent
in interface IMapControl2
setFullExtent
in interface IMapControlDefault
rhs1
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setVisibleRegion(IGeometry rhs1) throws IOException, AutomationException
Sets the MapControl's window to be the shape of the supplied geometry (in map units). Only the parts of the MapControl's layers that fall within the geometry specified will be seen.
setVisibleRegion
in interface IMapControl2
setVisibleRegion
in interface IMapControlDefault
rhs1
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISpatialReference getSpatialReference() throws IOException, AutomationException
This property is a shortcut to IMap::SpatialReference. The Map's SpatialReference will be set automatically to match the SpatialReference of the first Layer added to its layer collection. If the first Layer added has no SpatialReference defined, the coordinates in the Layer will be analyzed. If the coordinates range from 0 - 180, the MapControl assumes the layers data is geographic (i.e. contains unprojected coordinates in latitude and longitude) and the SpatialReference will appear as "GCS_Assumed_Geographic_1". If the MapControl cannot determine that the data source is geographic, the current SpatialReference will be "Unknown". The SpatialReference is also "Unknown" if the MapControl contains no data.
getSpatialReference
in interface IMapControl2
getSpatialReference
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.getMapScale()
,
IMapControl2.getReferenceScale()
,
IMapControl2.getMapUnits()
,
IMapControl2.getMap()
,
IMapControl3
,
IMapControl4
public void setSpatialReferenceByRef(ISpatialReference rhs1) throws IOException, AutomationException
setSpatialReferenceByRef
in interface IMapControl2
setSpatialReferenceByRef
in interface IMapControlDefault
rhs1
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ITool getCurrentTool() throws IOException, AutomationException
The CurrentTool is the Tool used to interact will the MapControl's display. Always check if a tool is enabled before setting it to the CurrentTool property, otherwise a user will be able to use a tool that is actually disabled.
When the CurrentTool is set the following events occur:
Within an ITool implementation it is recommended that the ITool::Deactivate event returns true. This allows a 'new' CurrentTool to be set, and allows the release of the CurrentTool when an application is shutting down.
getCurrentTool
in interface IMapControl2
getCurrentTool
in interface IMapControlDefault
getCurrentTool
in interface IToolbarBuddy
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCurrentToolByRef(ITool rhs1) throws IOException, AutomationException
Always check if a tool is enabled before setting it to the CurrentTool property, otherwise a user will be able to use a tool that is actually disabled.
If pCommand.Enabled = True Then Set PageLayoutControl1.CurrentTool = pCommand End If
When the CurrentTool is set the following events occur:
Note that if the CurrentTool is set to Nothing, the ITool::Deactivate event is not triggered on the 'old' CurrentTool, instead it is forcibly removed. The same behaviour occurs if the PageLayoutControl is killed.
Set PageLayoutControl1.CurrentTool = Nothing
setCurrentToolByRef
in interface IMapControl2
setCurrentToolByRef
in interface IMapControlDefault
setCurrentToolByRef
in interface IToolbarBuddy
rhs1
- A reference to a com.esri.arcgis.systemUI.ITool (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addLayer(ILayer layer, int toIndex) throws IOException, AutomationException
When a Layer is added to the MapControl's layer collection and no index is specified, it is added to the beginning or top of the collection with an index of 0. The numeric index of any other layers in the layer collection increments by one.
When a Layer is added and an index is specified, the numeric index of any other layers in the layer collection will increment by one, except for those layers with an index less than the specified index. The index of these layers will remain the same.
The Layer at the beginning or top of the collection with an index of 0 will be drawn last, whilst the Layer at the bottom of the collection will be drawn first.
Use the MoveLayerTo method to change the position of a Layer within the layer collection.
addLayer
in interface IMapControl2
addLayer
in interface IMapControlDefault
layer
- A reference to a com.esri.arcgis.carto.ILayer (in)toIndex
- The toIndex (in, optional, pass 0 if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.addLayerFromFile(String, int)
,
IMapControl2.addShapeFile(String, String)
,
IMapControl3
,
IMapControl4
public void addLayerFromFile(String lyrPath, int toIndex) throws IOException, AutomationException
When a layer file is added to the MapControl's layer collection and no index is specified, it is added to the beginning or top of the collection with an index of 0. The numeric index of any other layers in the layer collection increments by one.
When a layer file is added and an index is specified, the numeric index of any other layers in the layer collection will increment by one, except for those layers with an index less than the specified index. The index of these layers will remain the same.
The Layer at the beginning or top of the collection with an index of 0 will be drawn last, whilst the Layer at the bottom of the collection will be drawn first.
Use the MoveLayerTo method to change the position of a Layer within the layer collection.
addLayerFromFile
in interface IMapControl2
addLayerFromFile
in interface IMapControlDefault
lyrPath
- The lyrPath (in)toIndex
- The toIndex (in, optional, pass 0 if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.addLayer(com.esri.arcgis.carto.ILayer, int)
,
IMapControl2.addShapeFile(String, String)
,
IMapControl3
,
IMapControl4
public void clearLayers() throws IOException, AutomationException
clearLayers
in interface IMapControl2
clearLayers
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.getLayerCount()
,
IMapControl2.moveLayerTo(int, int)
,
IMapControl2.getLayer(int)
,
IMapControl3
,
IMapControl4
,
IMapControl2.deleteLayer(int)
public void deleteLayer(int index) throws IOException, AutomationException
This method is a shortcut to IMap::DeleteLayer.
deleteLayer
in interface IMapControl2
deleteLayer
in interface IMapControlDefault
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.clearLayers()
,
IMapControl2.getLayerCount()
,
IMapControl2.moveLayerTo(int, int)
,
IMapControl2.getLayer(int)
,
IMapControl3
,
IMapControl4
public void moveLayerTo(int fromIndex, int toIndex) throws IOException, AutomationException
The Layer at the beginning or top of the collection with an index of 0 will be drawn last, whilst the Layer at the bottom of the collection will be drawn first.
moveLayerTo
in interface IMapControl2
moveLayerTo
in interface IMapControlDefault
fromIndex
- The fromIndex (in)toIndex
- The toIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.clearLayers()
,
IMapControl2.getLayerCount()
,
IMapControl2.getLayer(int)
,
IMapControl3
,
IMapControl4
,
IMapControl2.deleteLayer(int)
public void loadMxFile(String mxPath, Object mapNameOrIndex, Object password) throws IOException, AutomationException
Loads an map document into the MapControl. The map document can be an ArcMap document, an ArcMap template or an ArcReader document. Use the CheckMxFile method to determine if the specified map document is a valid map document.
When LoadMXfile is used the user may be prompted for a password; refer to the tables below to determine when this may occur. Additionally, password prompts may be given if accessing MapDocuments using either the MapControl's PropertyPage, ArcMap or ArcReader; the tables also show in what circumstances this will occur.
Loading Map Documents (*.mxd, *.mxt, *.pmf) which reference IMS Services (with and without security)
Application | No Secure Services MXD/ MXT/ PMF files | Secure Servcies MXD/ MXT/ PMF files | Secure Servcies (password cached) MXD/ MXT files | Secure Servcies (password cached) PMF files |
---|---|---|---|---|
MapControl (programmatically) | No Prompt | Prompt | No Prompt | Prompt |
MapControl (property pages) | No Prompt | Prompt | No Prompt | Prompt |
ArcMap | No Prompt | Prompt | No Prompt | Prompt |
ArcReader (PMF files only) | No Prompt | Prompt | N/A | No Prompt |
* The Connection to the Internet server must have the Save User/ Password setting enabled. This can be set, for example, when using Add Internet Server in the Add Layers Dialog. Additionally, in the case of PMF files the ArcPublisher Cache password in PMF file setting must be enabled.
Loading Published Map Files (*.pmf) (with and without password protection)
Application | PMF with No Password | PMF with Password |
---|---|---|
MapControl (programmatically) | No Prompt | Supply in Code |
MapControl (property pages) | No Prompt | Prompt |
ArcMap | No Prompt | Prompt |
ArcReader | No Prompt | Prompt |
loadMxFile
in interface IMapControl2
loadMxFile
in interface IMapControlDefault
mxPath
- The mxPath (in)mapNameOrIndex
- A Variant (in, optional, pass null if not required)password
- A Variant (in, optional, pass null if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.readMxMaps(String, java.lang.Object)
,
IMapControl2.checkMxFile(String)
,
IMapControl3
,
IMapControl4
public void refresh(int phase, Object layerOrElement, Object envelope) throws IOException, AutomationException
Use the Refresh method to redraw the display. If the Refresh method is used and no arguments are supplied the refresh is based upon the IActiveView::Refresh method.
In all other cases the refresh is based upon the IActiveView::PartialRefresh method. The Refresh method supports the esriViewDrawPhases given below:
0 :esriViewNone
1 :esriViewBackground
2 :esriViewGeography
4 :esriViewGeoSelection
8 :esriViewGraphics
16 :esriViewSelection
32 :esriViewForeground
If the Refresh method is used and no phase argument is supplied, but one of the other arguments is supplied then all phases will be refreshed and the phase value will be 65535. Always supply a phase whenever possible to increase efficiency.
Use the layerOrElement argument to refresh a particular layer or graphic element. Use the envelope argument to refresh only a particular region. For example, if a new graphic is added you may only want to refresh the area surrounding the graphic.
Use the TrackCancel object to set whether users can stop drawing processes by using the escape or spacebar keys or by clicking the mouse.
When selecting features, Refresh must be called twice, once before and once after the selection operation.
refresh
in interface IMapControl2
refresh
in interface IMapControlDefault
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void pan() throws IOException, AutomationException
Pan preserves the MapScale property, but changes the Extent property.
Use the Pan method within the IMapControlEvents2::OnMouseDown event to allow the user to pan contents of the MapControl. The IMapControlEvents2::OnMouseMove event will be triggered during the pan, but no IMapControlEvents2::OnMouseUp event will occur. The ESC key on the keyboard can be used during panning to cancel the Pan.
pan
in interface IMapControl2
pan
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void centerAt(IPoint centerPoint) throws IOException, AutomationException
The CenterAt method positions the supplied point in the center of the MapControl. The Extent of the MapControl will change, but the scale will remain the same.
centerAt
in interface IMapControl2
centerAt
in interface IMapControlDefault
centerPoint
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope trackRectangle() throws IOException, AutomationException
Use the TrackRectangle method within the IMapControlEvents2::OnMouseDown event to rubberband a user defined rectangle. The IMapControlEvents2::OnMouseMove event will be triggered during the track, but no IMapControlEvents2::OnMouseUp event will occur. The ESC key on the keyboard can be used during the track to cancel the TrackRectangle.
trackRectangle
in interface IMapControl2
trackRectangle
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.trackLine()
,
IMapControl2.trackPolygon()
,
IMapControl3
,
IMapControl2.trackCircle()
,
IMapControl4
public IGeometry trackPolygon() throws IOException, AutomationException
TrackPolygon returns a geometry object that implements IPolygon.
Use the TrackPolygon method within the IMapControlEvents2::OnMouseDown event to rubberband a user defined polygon. The IMapControlEvents2::OnMouseMove event will be triggered during the track, but no IMapControlEvents2::OnMouseUp event will occur. The ESC key on the keyboard can be used during the track to cancel the TrackPolygon.
Calling ITopologicalOperator::Simplify on the digitized polygon will ensure that it is topologically correct.
trackPolygon
in interface IMapControl2
trackPolygon
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.trackRectangle()
,
IMapControl2.trackLine()
,
IMapControl3
,
IMapControl2.trackCircle()
,
IMapControl4
public IGeometry trackLine() throws IOException, AutomationException
TrackLine returns a geometry object that implements IPolyline.
Use the TrackLine method within the IMapControlEvents2::OnMouseDown event to rubberband a user defined line. The IMapControlEvents2::OnMouseMove event will be triggered during the track, but no IMapControlEvents2::OnMouseUp event will occur. The ESC key on the keyboard can be used during the track to cancel the TrackLine.
Calling ITopologicalOperator::Simplify on the digitized line will ensure that it is topologically correct.
trackLine
in interface IMapControl2
trackLine
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.trackRectangle()
,
IMapControl2.trackPolygon()
,
IMapControl3
,
IMapControl2.trackCircle()
,
IMapControl4
public IGeometry trackCircle() throws IOException, AutomationException
TrackCircle returns a geometry object that implements IPolygon.
Use the TrackCircle method within the IMapControlEvents2::OnMouseDown event to rubberband a user defined Circle. The IMapControlEvents2::OnMouseMove event will be triggered during the track, but no IMapControlEvents2::OnMouseUp event will occur. The ESC key on the keyboard can be used during the track to cancel the TrackCircle.
trackCircle
in interface IMapControl2
trackCircle
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.trackRectangle()
,
IMapControl2.trackLine()
,
IMapControl2.trackPolygon()
,
IMapControl3
,
IMapControl4
public void drawShape(IGeometry shape, Object symbol) throws IOException, AutomationException
Geometry objects implementing IEnvelope, IMultiPatch, IMultiPoint, IPoint, IPolygon and IPolyline are supported.
drawShape
in interface IMapControl2
drawShape
in interface IMapControlDefault
shape
- A reference to a com.esri.arcgis.geometry.IGeometry (in)symbol
- A Variant (in, optional, pass null if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.flashShape(com.esri.arcgis.geometry.IGeometry, int, int, java.lang.Object)
,
IMapControl2.drawText(com.esri.arcgis.geometry.IGeometry, String, java.lang.Object)
,
IMapControl3
,
IMapControl4
public void flashShape(IGeometry pShape, int nFlashes, int flashInterval, Object symbol) throws IOException, AutomationException
Geometry objects implementing IEnvelope, IMultiPatch, IMultiPoint, IPoint, IPolygon and IPolyline are supported.
flashShape
in interface IMapControl2
flashShape
in interface IMapControlDefault
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.drawText(com.esri.arcgis.geometry.IGeometry, String, java.lang.Object)
,
IMapControl3
,
IMapControl4
,
IMapControl2.drawShape(com.esri.arcgis.geometry.IGeometry, java.lang.Object)
public void fromMapPoint(IPoint pt, int[] x, int[] y) throws IOException, AutomationException
The FromMapPoint method takes an input point in MapUnits, and populates two variables with the equivalent control coordinates in pixels.
fromMapPoint
in interface IMapControl2
fromMapPoint
in interface IMapControlDefault
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.toMapPoint(int, int)
,
IMapControl3
,
IMapControl4
public IPoint toMapPoint(int x, int y) throws IOException, AutomationException
ToMapPoint converts a (X,Y) location in pixels to MapUnits.
toMapPoint
in interface IMapControl2
toMapPoint
in interface IMapControlDefault
x
- The x (in)y
- The y (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl3
,
IMapControl4
,
IMapControl2.fromMapPoint(com.esri.arcgis.geometry.IPoint, int[], int[])
public void drawText(IGeometry pGeometry, String text, Object pSymbol) throws IOException, AutomationException
drawText
in interface IMapControl2
drawText
in interface IMapControlDefault
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.flashShape(com.esri.arcgis.geometry.IGeometry, int, int, java.lang.Object)
,
IMapControl3
,
IMapControl4
,
IMapControl2.drawShape(com.esri.arcgis.geometry.IGeometry, java.lang.Object)
public boolean checkMxFile(String fileName) throws IOException, AutomationException
Determines whether the specified map document (*.mxd, *.mxt, *.pmf) is a valid map document and can be loaded into the MapControl. The method verifies the file exists and verifies the file internals conform to an expected storage format. The method does not read and validate the entire contents of the file; use the LoadMxFile to do this.
checkMxFile
in interface IMapControl2
checkMxFile
in interface IMapControlDefault
fileName
- The fileName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.readMxMaps(String, java.lang.Object)
,
IMapControl2.loadMxFile(String, java.lang.Object, java.lang.Object)
,
IMapControl3
,
IMapControl4
public IArray readMxMaps(String fileName, Object password) throws IOException, AutomationException
ReadMxMaps creates an array of Map objects from the specified Map Document (ArcMap document, ArcMap template or ArcReader document).
When ReadMXMaps is used the user may be prompted for a password; refer to the tables below to determine when this may occur. Additionally, password prompts may be given if accessing MapDocuments using either the MapControl's PropertyPage, ArcMap or ArcReader; the tables also show in what circumstances this will occur.
Reading Map Documents (*.mxd, *.mxt, *.pmf) which reference IMS Services (with and without security)
Application | No Secure Services MXD/ MXT/ PMF files | Secure Servcies MXD/ MXT/ PMF files | Secure Servcies (password cached) MXD/ MXT files | Secure Servcies (password cached) PMF files |
---|---|---|---|---|
MapControl (programmatically) | No Prompt | Prompt | No Prompt | Prompt |
MapControl (property pages) | No Prompt | Prompt | No Prompt | Prompt |
ArcMap | No Prompt | Prompt | No Prompt | Prompt |
ArcReader (PMF files only) | No Prompt | Prompt | N/A | No Prompt |
* The Connection to the Internet server must have the Save User/ Password setting enabled. This can be set, for example, when using Add Internet Server in the Add Layers Dialog. Additionally, in the case of PMF files the ArcPublisher Cache password in PMF file setting must be enabled.
Reading Published Map Files (*.pmf) (with and without password protection)
Application | PMF with No Password | PMF with Password |
---|---|---|
MapControl (programmatically) | No Prompt | Supply in Code |
MapControl (property pages) | No Prompt | Prompt |
ArcMap | No Prompt | Prompt |
ArcReader | No Prompt | Prompt |
readMxMaps
in interface IMapControl2
readMxMaps
in interface IMapControlDefault
fileName
- The fileName (in)password
- A Variant (in, optional, pass null if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.checkMxFile(String)
,
IMapControl2.loadMxFile(String, java.lang.Object, java.lang.Object)
,
IMapControl3
,
IMapControl4
public ITrackCancel getTrackCancel() throws IOException, AutomationException
Use the TrackCancel object to enable users to stop drawing processes by using the escape or spacebar keys.
getTrackCancel
in interface IMapControl2
getTrackCancel
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTrackCancelByRef(ITrackCancel rhs1) throws IOException, AutomationException
setTrackCancelByRef
in interface IMapControl2
setTrackCancelByRef
in interface IMapControlDefault
rhs1
- A reference to a com.esri.arcgis.system.ITrackCancel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getCustomProperty() throws IOException, AutomationException
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.
getCustomProperty
in interface IMapControl3
getCustomProperty
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCustomProperty(Object rhs1) throws IOException, AutomationException
setCustomProperty
in interface IMapControl3
setCustomProperty
in interface IMapControlDefault
rhs1
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void suppressResizeDrawing(boolean suppressResize, int resizeHWnd) throws IOException, AutomationException
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.
suppressResizeDrawing
in interface IMapControl3
suppressResizeDrawing
in interface IMapControlDefault
suppressResize
- The suppressResize (in)resizeHWnd
- The resizeHWnd (in, optional, pass 0 if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTipDelay(int rhs1) throws IOException, AutomationException
setTipDelay
in interface IMapControl3
setTipDelay
in interface IMapControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getTipDelay() throws IOException, AutomationException
Returns or sets the time delay in milliseconds before map tips are displayed. By default TipDelay is 500 milliseconds.
getTipDelay
in interface IMapControl3
getTipDelay
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getScale(IBasicMap pBasicMap) throws IOException, AutomationException
The GetScale method returns scale of the supplied Map or Scene. If the scale is unknown the GetScale method returns 0.0.
getScale
in interface ITOCBuddy
pBasicMap
- A reference to a com.esri.arcgis.carto.IBasicMap (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPageLayout getPageLayout() throws IOException, AutomationException
getPageLayout
in interface IMxdContents
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void enumConnectionPoints(IEnumConnectionPoints[] ppEnum) throws IOException, AutomationException
IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.
enumConnectionPoints
in interface IConnectionPointContainer
ppEnum
- A reference to a com.esri.arcgis.display.IEnumConnectionPoints (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP) throws IOException, AutomationException
IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.
findConnectionPoint
in interface IConnectionPointContainer
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)ppCP
- A reference to a com.esri.arcgis.display.IConnectionPoint (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void isDirty() throws IOException, AutomationException
isDirty
in interface IPersistStreamInit
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void load(IStream pStm) throws IOException, AutomationException
load
in interface IPersistStreamInit
pStm
- A reference to a com.esri.arcgis.system.IStream (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void save(IStream pStm, int fClearDirty) throws IOException, AutomationException
save
in interface IPersistStreamInit
pStm
- A reference to a com.esri.arcgis.system.IStream (in)fClearDirty
- The fClearDirty (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getSizeMax(_ULARGE_INTEGER[] pCbSize) throws IOException, AutomationException
getSizeMax
in interface IPersistStreamInit
pCbSize
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void initNew() throws IOException, AutomationException
initNew
in interface IPersistStreamInit
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMouseIconByRef(Picture picture) throws IOException, AutomationException
setMouseIconByRef
in interface IMapControl2
setMouseIconByRef
in interface IMapControlDefault
rhs1
- A reference to a com.esri.arcgis.support.ms.stdole.Picture (A com.esri.arcgis.support.ms.stdole.Picture COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Picture getMouseIcon() throws IOException, AutomationException
The MouseIcon property provides a custom icon that is used when the MousePointer property is set to esriPointerArrowHourglass (99).
In most development evironments the control's property pages can be used to load either a cursor (.cur) or icon (.ico) file. A cursor contains a custom 'hotspot' location and can be any size. The 'hotspot' location for an icon file defaults to the center of the icon. This property cannot be used to load animated cursor (.ani) files.
To programatically create an object implementing IPictureDisp there is the win32 function OleLoadPicture or helper methods depending on the development environment.
getMouseIcon
in interface IMapControl2
getMouseIcon
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapControl2.getMousePointer()
,
IMapControl3
,
IMapControl4
public void aboutBox() throws IOException, AutomationException
The AboutBox method causes a modal dialog box to display on top of the MapControl, containing information about the version and creation date of the MapControl as well as listing relevant legal and copyright information from ESRI.
aboutBox
in interface IMapControl2
aboutBox
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
getJintegraDispatch
in interface com.esri.arcgis.interop.RemoteObjRef
public void release()
release
in interface com.esri.arcgis.interop.RemoteObjRef
public void getClassID(GUID[] gUIDArray) throws IOException, AutomationException
IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.
getClassID
in interface IPersist
pClassID
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID gUID) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isAutoMouseWheel() throws IOException, AutomationException
Determines whether the mouse wheel can be used to zoom in and zoom out of the control's display. This property is true by default.
isAutoMouseWheel
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAutoMouseWheel(boolean rhs1) throws IOException, AutomationException
setAutoMouseWheel
in interface IMapControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isAutoKeyboardScrolling() throws IOException, AutomationException
Determines whether the 'Home' (keyCode 36), 'End' (keyCode 35), 'Page Down' (keyCode 34), 'PageUp' (keyCode 33) and 'Arrow' (keyCode 37-40) keys on the keyboard can be used to pan around the control's display. This property is true by default.
Most development environments use the 'Arrow' keys to switch focus between the controls embedded in a form or container. In such environments the MapControl will not by default receive the 'Arrow' keys to pan the display. To ensure 'Arrow' keys are received by the MapControl the KeyIntercept property must be set to intercept the 'Arrow' keys in order to pan the display when AutoKeyboardScrolling is true.
isAutoKeyboardScrolling
in interface IMapControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAutoKeyboardScrolling(boolean rhs1) throws IOException, AutomationException
setAutoKeyboardScrolling
in interface IMapControlDefault
rhs1
- The rhs1 (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 |