com.esri.arcgis.carto
Class MapDescriptor

java.lang.Object
  extended by com.esri.arcgis.carto.MapDescriptor
All Implemented Interfaces:
IMapDescriptor, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class MapDescriptor
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IMapDescriptor

The Map Descriptor coclass contains a description of a map in the current document.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
MapDescriptor()
          Constructs a MapDescriptor using ArcGIS Engine.
MapDescriptor(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MapDescriptor theMapDescriptor = (MapDescriptor) obj;
 
Method Summary
 void addMapSurround(IMapSurround surround, int xPixelOrigin, int yPixelOrigin, int anchorPoint)
          Call this multiple times to place surrounds on the surface of the map.
 void addPixelGraphic(IElement graphic)
          Call this multiple times to place graphics in pixel space on the map above Custom Graphics and Map Surrounds.
 void clearMapSurrounds()
          Remove all surrounds from the map.
 void clearPixelGraphics()
          Remove all pixel graphics from the map.
 boolean equals(Object o)
          Compare this object with another
 double getAngle()
          The angle/rotation of the map in degrees, measured anti-clockwise.
 IColor getBackgroundColor()
          The background color of the map.
static String getClsid()
          getClsid.
 IArray getCustomGraphics()
          Custom graphics of the map.
 IEnvelope getExtent()
          The current extent of the map.
 IEnvelope getFullExtent()
          The full extent of the map.
 IGeometryCollection getLabelBarriers()
          The barriers used for labeling.
 Object getLayerOrder()
          The layer order for the map.
 IArray getLayers()
          The layer descriptors of the map.
 IPoint getMapCenter()
          The center of the map.
 double getMapScale()
          The scale of the map.
 String getName()
          The name of the map.
 ISpatialReference getSpatialReference()
          The spatial reference of the map.
 IColor getTransparentColor()
          The color used for transparency (100 %).
 int hashCode()
          the hashcode for this object
 boolean isKeepAspectRatio()
          Indicates whether of not to maintain the aspect ratio.
 void setAngle(double angleDegrees)
          The angle/rotation of the map in degrees, measured anti-clockwise.
 void setBackgroundColor(IColor color)
          The background color of the map.
 void setCustomGraphics(IArray elements)
          Custom graphics of the map.
 void setExtent(IEnvelope extent)
          The current extent of the map.
 void setFullExtent(IEnvelope extent)
          The full extent of the map.
 void setKeepAspectRatio(boolean keep)
          Indicates whether of not to maintain the aspect ratio.
 void setLabelBarriers(IGeometryCollection barriers)
          The barriers used for labeling.
 void setLayerOrder(Object layerIds)
          The layer order for the map.
 void setLayers(IArray layerDescriptors)
          The layer descriptors of the map.
 void setMapCenter(IPoint center)
          The center of the map.
 void setMapScale(double mapScale)
          The scale of the map.
 void setName(String name)
          The name of the map.
 void setSpatialReferenceByRef(ISpatialReference spatialReference)
          The spatial reference of the map.
 void setTransparentColor(IColor color)
          The color used for transparency (100 %).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

MapDescriptor

public MapDescriptor()
              throws IOException,
                     UnknownHostException
Constructs a MapDescriptor using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

MapDescriptor

public MapDescriptor(Object obj)
              throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MapDescriptor theMapDescriptor = (MapDescriptor) obj;

Construct a MapDescriptor using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to MapDescriptor.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getName

public String getName()
               throws IOException,
                      AutomationException
The name of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getName in interface IMapDescriptor
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setName

public void setName(String name)
             throws IOException,
                    AutomationException
The name of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setName in interface IMapDescriptor
Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFullExtent

public IEnvelope getFullExtent()
                        throws IOException,
                               AutomationException
The full extent of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

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

setFullExtent

public void setFullExtent(IEnvelope extent)
                   throws IOException,
                          AutomationException
The full extent of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

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

getExtent

public IEnvelope getExtent()
                    throws IOException,
                           AutomationException
The current extent of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

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

setExtent

public void setExtent(IEnvelope extent)
               throws IOException,
                      AutomationException
The current extent of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

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

getSpatialReference

public ISpatialReference getSpatialReference()
                                      throws IOException,
                                             AutomationException
The spatial reference of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

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

setSpatialReferenceByRef

public void setSpatialReferenceByRef(ISpatialReference spatialReference)
                              throws IOException,
                                     AutomationException
The spatial reference of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

getAngle

public double getAngle()
                throws IOException,
                       AutomationException
The angle/rotation of the map in degrees, measured anti-clockwise.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getAngle in interface IMapDescriptor
Returns:
The angleDegrees
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAngle

public void setAngle(double angleDegrees)
              throws IOException,
                     AutomationException
The angle/rotation of the map in degrees, measured anti-clockwise.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setAngle in interface IMapDescriptor
Parameters:
angleDegrees - The angleDegrees (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayers

public IArray getLayers()
                 throws IOException,
                        AutomationException
The layer descriptors of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getLayers in interface IMapDescriptor
Returns:
A reference to a com.esri.arcgis.system.IArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLayers

public void setLayers(IArray layerDescriptors)
               throws IOException,
                      AutomationException
The layer descriptors of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setLayers in interface IMapDescriptor
Parameters:
layerDescriptors - A reference to a com.esri.arcgis.system.IArray (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayerOrder

public Object getLayerOrder()
                     throws IOException,
                            AutomationException
The layer order for the map. The VARIANT value is a SAFEARRAY of long integers that list the layerIDs in order. The first element is top layer in the map. Layers that are within groups are not listed in this array.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getLayerOrder in interface IMapDescriptor
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLayerOrder

public void setLayerOrder(Object layerIds)
                   throws IOException,
                          AutomationException
The layer order for the map. The VARIANT value is a SAFEARRAY of long integers that list the layerIDs in order. The first element is top layer in the map. Layers that are within groups are not listed in this array.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setLayerOrder in interface IMapDescriptor
Parameters:
layerIds - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCustomGraphics

public IArray getCustomGraphics()
                         throws IOException,
                                AutomationException
Custom graphics of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCustomGraphics in interface IMapDescriptor
Returns:
A reference to a com.esri.arcgis.system.IArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCustomGraphics

public void setCustomGraphics(IArray elements)
                       throws IOException,
                              AutomationException
Custom graphics of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setCustomGraphics in interface IMapDescriptor
Parameters:
elements - A reference to a com.esri.arcgis.system.IArray (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLabelBarriers

public IGeometryCollection getLabelBarriers()
                                     throws IOException,
                                            AutomationException
The barriers used for labeling.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getLabelBarriers in interface IMapDescriptor
Returns:
A reference to a com.esri.arcgis.geometry.IGeometryCollection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLabelBarriers

public void setLabelBarriers(IGeometryCollection barriers)
                      throws IOException,
                             AutomationException
The barriers used for labeling.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setLabelBarriers in interface IMapDescriptor
Parameters:
barriers - A reference to a com.esri.arcgis.geometry.IGeometryCollection (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapScale

public double getMapScale()
                   throws IOException,
                          AutomationException
The scale of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

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

setMapScale

public void setMapScale(double mapScale)
                 throws IOException,
                        AutomationException
The scale of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

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

getMapCenter

public IPoint getMapCenter()
                    throws IOException,
                           AutomationException
The center of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMapCenter in interface IMapDescriptor
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMapCenter

public void setMapCenter(IPoint center)
                  throws IOException,
                         AutomationException
The center of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

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

isKeepAspectRatio

public boolean isKeepAspectRatio()
                          throws IOException,
                                 AutomationException
Indicates whether of not to maintain the aspect ratio.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isKeepAspectRatio in interface IMapDescriptor
Returns:
The keep
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setKeepAspectRatio

public void setKeepAspectRatio(boolean keep)
                        throws IOException,
                               AutomationException
Indicates whether of not to maintain the aspect ratio.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setKeepAspectRatio in interface IMapDescriptor
Parameters:
keep - The keep (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBackgroundColor

public IColor getBackgroundColor()
                          throws IOException,
                                 AutomationException
The background color of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getBackgroundColor in interface IMapDescriptor
Returns:
A reference to a com.esri.arcgis.display.IColor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBackgroundColor

public void setBackgroundColor(IColor color)
                        throws IOException,
                               AutomationException
The background color of the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setBackgroundColor in interface IMapDescriptor
Parameters:
color - A reference to a com.esri.arcgis.display.IColor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTransparentColor

public IColor getTransparentColor()
                           throws IOException,
                                  AutomationException
The color used for transparency (100 %).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTransparentColor in interface IMapDescriptor
Returns:
A reference to a com.esri.arcgis.display.IColor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTransparentColor

public void setTransparentColor(IColor color)
                         throws IOException,
                                AutomationException
The color used for transparency (100 %).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setTransparentColor in interface IMapDescriptor
Parameters:
color - A reference to a com.esri.arcgis.display.IColor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addMapSurround

public void addMapSurround(IMapSurround surround,
                           int xPixelOrigin,
                           int yPixelOrigin,
                           int anchorPoint)
                    throws IOException,
                           AutomationException
Call this multiple times to place surrounds on the surface of the map. Specify coordinates in pixels. Origin is at lower left corner.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
addMapSurround in interface IMapDescriptor
Parameters:
surround - A reference to a com.esri.arcgis.carto.IMapSurround (in)
xPixelOrigin - The xPixelOrigin (in)
yPixelOrigin - The yPixelOrigin (in)
anchorPoint - A com.esri.arcgis.carto.esriAnchorPointEnum constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearMapSurrounds

public void clearMapSurrounds()
                       throws IOException,
                              AutomationException
Remove all surrounds from the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
clearMapSurrounds in interface IMapDescriptor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addPixelGraphic

public void addPixelGraphic(IElement graphic)
                     throws IOException,
                            AutomationException
Call this multiple times to place graphics in pixel space on the map above Custom Graphics and Map Surrounds. Specify coordinates in pixels. Origin is at lower left corner.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
addPixelGraphic in interface IMapDescriptor
Parameters:
graphic - A reference to a com.esri.arcgis.carto.IElement (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearPixelGraphics

public void clearPixelGraphics()
                        throws IOException,
                               AutomationException
Remove all pixel graphics from the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
clearPixelGraphics in interface IMapDescriptor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.