com.esri.arcgis.carto
Class ILegendInfoProxy

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

public class ILegendInfoProxy
extends com.esri.arcgis.interop.Dispatch
implements ILegendInfo, Serializable

Provides access to members that control legend information provided by a renderer.

Description

Implemented by layers and renderers to manage legend information. Layers typically delegate the implementation of this interface to the renderer. Legend information appears in the ArcMap table of contents as well as in ArcMap legends.

Remarks

This interface provides access to a layer or renderer's legend information and symbols. Use this interface to access the information about a layer or renderer that appears in the table of contents and also in legends.

All ESRI renderers have at least one LegendGroup which in turn has at least one LegendClass. Though renderers typically store all of the symbols they use to draw features in their LegendClass objects, it is best to access these symbols via the specific renderer interface for the renderer object you are using. For example, when rendering features, for a ClassBreaksRenderer use IClassBreaksRenderer::Symbol, or for a ProportionalSymbolRenderer use IProportionalSymbolRenderer::MinSymbol and IProportionalSymbolRenderer::BackgroundSymbol.

Some renderers, for example SimpleRenderer, ClassBreaksRenderer, and UniqueValueRenderer, update the legend groups and legend classes automatically when you set the renderer symbols. However, other renderers require you to call a method on a renderer specific interface to update the legend after making a symbol change. For the ProportionalSymbolRenderer, ChartRenderer, DotDensityRenderer, and BiUniqueValueRenderer you must do this. For example, call IProportionalSymbolRenderer:CreateLegendSymbols to update the legend for a layer symbolized with a ProportionalSymbolRenderer.

Product Availability

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

See Also:
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
  ILegendInfoProxy()
           
  ILegendInfoProxy(Object obj)
           
protected ILegendInfoProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 ILegendGroup getLegendGroup(int index)
          Legend group at the specified index.
 int getLegendGroupCount()
          Number of legend groups contained by the object.
 ILegendItem getLegendItem()
          Optional.
 boolean isSymbolsAreGraduated()
          Indicates if symbols are graduated.
 void removeListener(String iidStr, Object theListener)
           
 void setSymbolsAreGraduated(boolean symbolsAreGraduated)
          Indicates if symbols are graduated.
 
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

ILegendInfoProxy

public ILegendInfoProxy()

ILegendInfoProxy

public ILegendInfoProxy(Object obj)
                 throws IOException
Throws:
IOException

ILegendInfoProxy

protected ILegendInfoProxy(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

getLegendGroupCount

public int getLegendGroupCount()
                        throws IOException,
                               AutomationException
Number of legend groups contained by the object.

Remarks

The number of legend groups is determined by the implementation of the renderer, consequently this property is read only. For example, SimpleRenderer has one group, while a BiUniqueValueRenderer has any number of groups.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getLegendGroupCount in interface ILegendInfo
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLegendGroup

public ILegendGroup getLegendGroup(int index)
                            throws IOException,
                                   AutomationException
Legend group at the specified index.

Product Availability

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

Specified by:
getLegendGroup in interface ILegendInfo
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.carto.ILegendGroup
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLegendItem

public ILegendItem getLegendItem()
                          throws IOException,
                                 AutomationException
Optional. Defines legend formatting for layer rendered with this object.

Remarks

Layer or renderer legend information is further formatted for display in ArcMap legends. A renderer can override this formatting by returning a LegendItem for this property. ESRI renderers typically do not return anything for this property. With this configuration, legend formatting becomes a user or developer choice on the legend object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getLegendItem in interface ILegendInfo
Returns:
A reference to a com.esri.arcgis.carto.ILegendItem
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSymbolsAreGraduated

public boolean isSymbolsAreGraduated()
                              throws IOException,
                                     AutomationException
Indicates if symbols are graduated.

Description

Indicates whether the symbols used for a layer or renderer's legend vary by size.

Remarks

For example the proportional symbol renderer returns True for this property.

You can use this property to distinguish between a layer symbolized with graduated color or graduated symbol type layer symbology. Both of these symbolizations use a ClassBreaksRenderer, but only a graduated symbol symbolization will return True for this property.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isSymbolsAreGraduated in interface ILegendInfo
Returns:
The symbolsAreGraduated
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSymbolsAreGraduated

public void setSymbolsAreGraduated(boolean symbolsAreGraduated)
                            throws IOException,
                                   AutomationException
Indicates if symbols are graduated.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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