com.esri.arcgis.carto
Interface IGraphicsLayer

All Superinterfaces:
Serializable
All Known Subinterfaces:
ICompositeGraphicsLayer, ICompositeGraphicsLayer2
All Known Implementing Classes:
CompositeGraphicsLayer, FDOGraphicsLayer, GlobeGraphicsLayer, GraphicsLayer3D, GraphicsSubLayer, IGraphicsLayerProxy

public interface IGraphicsLayer
extends Serializable

Provides access to members that control the Graphics Layer.

When To Use

A graphics layer can be associated with another layer in the map; when that other layer changes visibility, the graphics layer can change visibility also. Use the IGraphicsLayer interface to manage this.

The IGraphicsLayer interface also has methods to activate and deactivate the graphics layer. When a graphics layer is active, it is the current annotation target.

Example:

   

//This example assumes that you already have an IMap (pMap) set      
IGraphicsLayer pGraLyr =    
new IGraphicsLayerProxy( pMap.getActiveGraphicsLayer());

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
IMap

Method Summary
 void activate(IScreenDisplay containerScreen)
          Prepare to display graphic on screen.
 void deactivate()
          ActiveView that graphics are displayed on is no longer visible.
 ILayer getAssociatedLayer()
          Layer that is associated with this graphics layer.
 boolean isUseAssociatedLayerVisibility()
          Indicates if the layer that is associated with this graphics layer controls the visibility.
 void setAssociatedLayerByRef(ILayer layer)
          Layer that is associated with this graphics layer.
 void setUseAssociatedLayerVisibility(boolean useLayer)
          Indicates if the layer that is associated with this graphics layer controls the visibility.
 

Method Detail

activate

void activate(IScreenDisplay containerScreen)
              throws IOException,
                     AutomationException
Prepare to display graphic on screen.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
containerScreen - A reference to a com.esri.arcgis.display.IScreenDisplay (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deactivate

void deactivate()
                throws IOException,
                       AutomationException
ActiveView that graphics are displayed on is no longer visible.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isUseAssociatedLayerVisibility

boolean isUseAssociatedLayerVisibility()
                                       throws IOException,
                                              AutomationException
Indicates if the layer that is associated with this graphics layer controls the visibility.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setUseAssociatedLayerVisibility

void setUseAssociatedLayerVisibility(boolean useLayer)
                                     throws IOException,
                                            AutomationException
Indicates if the layer that is associated with this graphics layer controls the visibility.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getAssociatedLayer

ILayer getAssociatedLayer()
                          throws IOException,
                                 AutomationException
Layer that is associated with this graphics layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.carto.ILayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAssociatedLayerByRef

void setAssociatedLayerByRef(ILayer layer)
                             throws IOException,
                                    AutomationException
Layer that is associated with this graphics layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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