com.esri.arcgis.carto
Interface ICompositeGraphicsLayer

All Superinterfaces:
IGraphicsLayer, Serializable
All Known Subinterfaces:
ICompositeGraphicsLayer2
All Known Implementing Classes:
CompositeGraphicsLayer

public interface ICompositeGraphicsLayer
extends IGraphicsLayer, Serializable

Provides access to members that control a collection of graphics layers that behave like single layer.

Superseded By

ICompositeGraphicsLayer2

Remarks

A CompositeGraphicsLayer manages a collection of graphics layers.

An example of a composite graphics layer is the Map’s basic graphics layer accessed through IMap::BasciGraphicsLayer. It is both a graphics layer on which to draw and a composite graphics layer which contains all the map's graphic layer. The Map’s basic graphics layer cannot be deleted from the CompositeGraphicsLayer object. Get a reference to the map's basic graphics layer throught the ICompositeGraphicsLayer interface to manage the layer it contains. This way, graphics layers can be added to or deleted from the map.

The ICompositeGraphicsLayer interface inherits from the IGraphicsLayer interface.

Example:

//This example assumes that you already have an IMap (pMap) set      
ICompositeGraphicsLayer pCompGraLyr = 
new ICompositeGraphicsLayerProxy( pMap.getActiveGraphicsLayer());

Product Availability

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

See Also:
IGraphicsLayer

Method Summary
 IGraphicsLayer addLayer(String layerName, IFeatureLayer featureLayer)
          Adds a layer to the composite graphics layer.
 void deleteLayer(String layerName)
          Removes a layer from the composite graphics layer.
 IGraphicsLayer findLayer(String layerName)
          Finds a layer in the composite graphics layer.
 
Methods inherited from interface com.esri.arcgis.carto.IGraphicsLayer
activate, deactivate, getAssociatedLayer, isUseAssociatedLayerVisibility, setAssociatedLayerByRef, setUseAssociatedLayerVisibility
 

Method Detail

addLayer

IGraphicsLayer addLayer(String layerName,
                        IFeatureLayer featureLayer)
                        throws IOException,
                               AutomationException
Adds a layer to the composite graphics layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
layerName - The layerName (in)
featureLayer - A reference to a com.esri.arcgis.carto.IFeatureLayer (in)
Returns:
A reference to a com.esri.arcgis.carto.IGraphicsLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteLayer

void deleteLayer(String layerName)
                 throws IOException,
                        AutomationException
Removes a layer from the composite graphics layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

findLayer

IGraphicsLayer findLayer(String layerName)
                         throws IOException,
                                AutomationException
Finds a layer in the composite graphics layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
layerName - The layerName (in)
Returns:
A reference to a com.esri.arcgis.carto.IGraphicsLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.