com.esri.arcgis.carto
Interface ILegendGroup

All Superinterfaces:
Serializable
All Known Implementing Classes:
LegendGroup, TemporalLegendGroup

public interface ILegendGroup
extends Serializable

Provides access to members that control the collection of legend classes provided by a renderer.

Remarks

This interface manages an array of LegendClass objects. Inside a LegendClass object is one Symbol object. Classes can be looked up, but modifying the number of classes through addition, insertion, and deletion is the job of the renderer object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 void addClass(ILegendClass legendClass)
          Adds a new legend class to the group at the end of list.
 void clearClasses()
          Removes all classes from the group.
 ILegendClass esri_getClass(int index)
          Legend class at the specified index.
 int getClassCount()
          Number of legend classes in the group.
 String getHeading()
          String heading.
 void insertClass(int index, ILegendClass legendClass)
          Inserts a new legend class into the group at the specified index.
 boolean isEditable()
          Indicates if the group can be edited.
 boolean isVisible()
          Indicates if the group is displayed.
 void removeClass(int index)
          Removes the legend class from the group at the specified index.
 void setEditable(boolean editable)
          Indicates if the group can be edited.
 void setHeading(String heading)
          String heading.
 void setVisible(boolean visible)
          Indicates if the group is displayed.
 

Method Detail

isVisible

boolean isVisible()
                  throws IOException,
                         AutomationException
Indicates if the group is displayed.

Remarks

This property indicates whether or not a layer's entry in the table of contents is expanded or collapsed. If a layer has only one legend group, then if Visible = True, then the layer is expanded. If a layer has more than one legend group, then the rule is that if any of the the layer's legend groups are visible, then the layer's entry in the table of contents is expanded.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setVisible

void setVisible(boolean visible)
                throws IOException,
                       AutomationException
Indicates if the group is displayed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isEditable

boolean isEditable()
                   throws IOException,
                          AutomationException
Indicates if the group can be edited. Default is editable.

Remarks

This property indicates whether or not the symbols and text strings in the LegendClass objects of a LegendGroup can be edited. If this property is False then the user cannot edit the group's symbols and text labels in the ArcMap table of contents.

For example, the legend for a layer symbolized with a ChartRenderer with PieChartSymbols consists of two legend groups. The first legend group contains a representative pie chart symbol and is not editable. The second legend group contains the individual fill symbols that make up the pie chart slices, and this legend group is editable.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setEditable

void setEditable(boolean editable)
                 throws IOException,
                        AutomationException
Indicates if the group can be edited. Default is editable.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getHeading

String getHeading()
                  throws IOException,
                         AutomationException
String heading.

Remarks

This property is the text string that describes the content of the legend group. This text string appears in the table of contents and can appear also in the legend. This string is typically generated by the renderer, but can be modified after creation by the user.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setHeading

void setHeading(String heading)
                throws IOException,
                       AutomationException
String heading.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getClassCount

int getClassCount()
                  throws IOException,
                         AutomationException
Number of legend classes in the group.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

esri_getClass

ILegendClass esri_getClass(int index)
                           throws IOException,
                                  AutomationException
Legend class at the specified index.

Product Availability

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

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

addClass

void addClass(ILegendClass legendClass)
              throws IOException,
                     AutomationException
Adds a new legend class to the group at the end of list.

Remarks

Modifying the number of classes in a LegendGroup through addition, insertion, and deletion is the job of the renderer object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

insertClass

void insertClass(int index,
                 ILegendClass legendClass)
                 throws IOException,
                        AutomationException
Inserts a new legend class into the group at the specified index.

Remarks

Modifying the number of classes in a LegendGroup through addition, insertion, and deletion is the job of the renderer object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

removeClass

void removeClass(int index)
                 throws IOException,
                        AutomationException
Removes the legend class from the group at the specified index.

Remarks

Modifying the number of classes in a LegendGroup through addition, insertion, and deletion is the job of the renderer object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

clearClasses

void clearClasses()
                  throws IOException,
                         AutomationException
Removes all classes from the group.

Remarks

Modifying the number of classes in a LegendGroup through addition, insertion, and deletion is the job of the renderer object.

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.