com.esri.arcgis.carto
Class IGraphicsLayerProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.carto.IGraphicsLayerProxy
All Implemented Interfaces:
IGraphicsLayer, Externalizable, Serializable

public class IGraphicsLayerProxy
extends com.esri.arcgis.interop.Dispatch
implements IGraphicsLayer, 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.

See Also:
IMap, Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IGraphicsLayerProxy()
           
  IGraphicsLayerProxy(Object obj)
           
protected IGraphicsLayerProxy(Object obj, String iid)
           
 
Method Summary
 void activate(IScreenDisplay containerScreen)
          Prepare to display graphic on screen.
 void addListener(String iidStr, Object theListener, Object theSource)
           
 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 removeListener(String iidStr, Object theListener)
           
 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.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IGraphicsLayerProxy

public IGraphicsLayerProxy()

IGraphicsLayerProxy

public IGraphicsLayerProxy(Object obj)
                    throws IOException
Throws:
IOException

IGraphicsLayerProxy

protected IGraphicsLayerProxy(Object obj,
                              String iid)
                       throws IOException
Throws:
IOException
Method Detail

addListener

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

removeListener

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

activate

public 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

Specified by:
activate in interface IGraphicsLayer
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

public 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

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

isUseAssociatedLayerVisibility

public 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

Specified by:
isUseAssociatedLayerVisibility in interface IGraphicsLayer
Returns:
The useLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setUseAssociatedLayerVisibility

public 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

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

getAssociatedLayer

public 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

Specified by:
getAssociatedLayer in interface IGraphicsLayer
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

public 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

Specified by:
setAssociatedLayerByRef in interface IGraphicsLayer
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.