com.esri.arcgis.carto
Interface ILegendItem2

All Superinterfaces:
Serializable
All Known Implementing Classes:
HorizontalBarLegendItem, HorizontalLegendItem, NestedLegendItem, VerticalLegendItem

public interface ILegendItem2
extends Serializable

Provides access to members that control how a layer appears in a legend. Can be stored in a style.

Superseded By

ILegendItem3

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 void changeFlowDirection(boolean rightToLeft)
          Indicates if a legend's flow direction changes.
 void createGraphics(IDisplay display, ILegendFormat legendFormat)
          Rebuilds the list of graphics.
 short getColumns()
          Number of columns in the legend item.
 IEnumElement getGraphics()
          List of graphics that represent the legend item.
 int getGroupIndex()
          Zero-based index of the legend group shown by this item.
 ITextSymbol getHeadingSymbol()
          Text symbol used to draw the heading.
 double getHeight()
          Height of the item in points.
 ILayer getLayer()
          Associated layer.
 ITextSymbol getLayerNameSymbol()
          Text symbol used to draw the layer name.
 ILegendClassFormat getLegendClassFormat()
          Default formatting information for the legend classes.
 String getName()
          Name of the style.
 double getWidth()
          Width of the item in points.
 boolean isCanDisplay(ILayer layer)
          Indicates if the style is compatible with the specified layer.
 boolean isKeepTogether()
          Indicates if classes must appear in a single column or whether they can be split across multiple columns.
 boolean isNewColumn()
          Indicates if the item starts a new column in the legend.
 boolean isShowDescriptions()
          Indicates if descriptions are visible.
 boolean isShowHeading()
          Indicates if heading is visibile.
 boolean isShowLabels()
          Indicates if labels are visible.
 boolean isShowLayerName()
          Indicates if layer name is visibile.
 void setColumns(short columns)
          Number of columns in the legend item.
 void setGroupIndex(int index)
          Zero-based index of the legend group shown by this item.
 void setHeadingSymbol(ITextSymbol symbol)
          Text symbol used to draw the heading.
 void setKeepTogether(boolean flag)
          Indicates if classes must appear in a single column or whether they can be split across multiple columns.
 void setLayerByRef(ILayer layer)
          Associated layer.
 void setLayerNameSymbol(ITextSymbol symbol)
          Text symbol used to draw the layer name.
 void setLegendClassFormat(ILegendClassFormat format)
          Default formatting information for the legend classes.
 void setNewColumn(boolean flag)
          Indicates if the item starts a new column in the legend.
 void setShowDescriptions(boolean showDescriptions)
          Indicates if descriptions are visible.
 void setShowHeading(boolean showHeading)
          Indicates if heading is visibile.
 void setShowLabels(boolean showLabels)
          Indicates if labels are visible.
 void setShowLayerName(boolean showLayerName)
          Indicates if layer name is visibile.
 

Method Detail

getName

String getName()
               throws IOException,
                      AutomationException
Name of the style.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isCanDisplay

boolean isCanDisplay(ILayer layer)
                     throws IOException,
                            AutomationException
Indicates if the style is compatible with the specified layer.

Product Availability

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

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

getLayer

ILayer getLayer()
                throws IOException,
                       AutomationException
Associated 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.

setLayerByRef

void setLayerByRef(ILayer layer)
                   throws IOException,
                          AutomationException
Associated layer.

Product Availability

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

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.

isNewColumn

boolean isNewColumn()
                    throws IOException,
                           AutomationException
Indicates if the item starts a new column in the legend.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setNewColumn

void setNewColumn(boolean flag)
                  throws IOException,
                         AutomationException
Indicates if the item starts a new column in the legend.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getColumns

short getColumns()
                 throws IOException,
                        AutomationException
Number of columns in the legend item.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setColumns

void setColumns(short columns)
                throws IOException,
                       AutomationException
Number of columns in the legend item.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isKeepTogether

boolean isKeepTogether()
                       throws IOException,
                              AutomationException
Indicates if classes must appear in a single column or whether they can be split across multiple columns.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setKeepTogether

void setKeepTogether(boolean flag)
                     throws IOException,
                            AutomationException
Indicates if classes must appear in a single column or whether they can be split across multiple columns.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isShowLayerName

boolean isShowLayerName()
                        throws IOException,
                               AutomationException
Indicates if layer name is visibile.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setShowLayerName

void setShowLayerName(boolean showLayerName)
                      throws IOException,
                             AutomationException
Indicates if layer name is visibile.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getLayerNameSymbol

ITextSymbol getLayerNameSymbol()
                               throws IOException,
                                      AutomationException
Text symbol used to draw the layer name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setLayerNameSymbol

void setLayerNameSymbol(ITextSymbol symbol)
                        throws IOException,
                               AutomationException
Text symbol used to draw the layer name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getGroupIndex

int getGroupIndex()
                  throws IOException,
                         AutomationException
Zero-based index of the legend group shown by this item. Use -1 to show all legend groups using this item.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setGroupIndex

void setGroupIndex(int index)
                   throws IOException,
                          AutomationException
Zero-based index of the legend group shown by this item. Use -1 to show all legend groups using this item.

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.

isShowHeading

boolean isShowHeading()
                      throws IOException,
                             AutomationException
Indicates if heading is visibile.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setShowHeading

void setShowHeading(boolean showHeading)
                    throws IOException,
                           AutomationException
Indicates if heading is visibile.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getHeadingSymbol

ITextSymbol getHeadingSymbol()
                             throws IOException,
                                    AutomationException
Text symbol used to draw the heading.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setHeadingSymbol

void setHeadingSymbol(ITextSymbol symbol)
                      throws IOException,
                             AutomationException
Text symbol used to draw the heading.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getLegendClassFormat

ILegendClassFormat getLegendClassFormat()
                                        throws IOException,
                                               AutomationException
Default formatting information for the legend classes. Renderer may override.

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.ILegendClassFormat
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLegendClassFormat

void setLegendClassFormat(ILegendClassFormat format)
                          throws IOException,
                                 AutomationException
Default formatting information for the legend classes. Renderer may override.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isShowLabels

boolean isShowLabels()
                     throws IOException,
                            AutomationException
Indicates if labels are visible.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setShowLabels

void setShowLabels(boolean showLabels)
                   throws IOException,
                          AutomationException
Indicates if labels are visible.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isShowDescriptions

boolean isShowDescriptions()
                           throws IOException,
                                  AutomationException
Indicates if descriptions are visible.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setShowDescriptions

void setShowDescriptions(boolean showDescriptions)
                         throws IOException,
                                AutomationException
Indicates if descriptions are visible.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createGraphics

void createGraphics(IDisplay display,
                    ILegendFormat legendFormat)
                    throws IOException,
                           AutomationException
Rebuilds the list of graphics. Call whenever the associated layer changes.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getWidth

double getWidth()
                throws IOException,
                       AutomationException
Width of the item in points. Must call CreateGraphics first.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getHeight

double getHeight()
                 throws IOException,
                        AutomationException
Height of the item in points. Must call CreateGraphics first.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getGraphics

IEnumElement getGraphics()
                         throws IOException,
                                AutomationException
List of graphics that represent the legend item. Must call CreateGraphics first.

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.IEnumElement
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

changeFlowDirection

void changeFlowDirection(boolean rightToLeft)
                         throws IOException,
                                AutomationException
Indicates if a legend's flow direction changes. Update alignment settings.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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