|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILegendInfo
Provides access to members that control legend information provided by a renderer.
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.
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.
Method Summary | |
---|---|
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 |
setSymbolsAreGraduated(boolean symbolsAreGraduated)
Indicates if symbols are graduated. |
Method Detail |
---|
int getLegendGroupCount() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ILegendGroup getLegendGroup(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ILegendItem getLegendItem() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isSymbolsAreGraduated() throws IOException, AutomationException
Indicates whether the symbols used for a layer or renderer's legend vary by size.
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSymbolsAreGraduated(boolean symbolsAreGraduated) throws IOException, AutomationException
symbolsAreGraduated
- The symbolsAreGraduated (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |