com.esri.arcgis.carto
Interface ILegendFormat

All Superinterfaces:
Serializable
All Known Implementing Classes:
LegendFormat

public interface ILegendFormat
extends Serializable

Provides access to members that control formatting information for a legend.

Remarks

ILegendFormat controls general legend formatting.

Legend class formatting from a LegendClassFormat object can override some properties set through this interface (DefaultPatchWidth, DefaultPathHeight, DefaultLinePatch, DefaultAreaPatch). The LegendClassFormat object comes from either the layer (ILegendClass.Format), or from the legend (ILegendItem.LegendClassFormat ).

For more on patches, see the help under IPatch.

The LegendFormat also manages the format of the legend's title. Set ShowTitle to False to hide the title. TitlePosition allows you to set on which side of the legend the title will be displayed.

The gap properties define the spacing between the different parts of the legend.

The Scale method is used to resize the legend.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 IAreaPatch getDefaultAreaPatch()
          Area patch.
 ILinePatch getDefaultLinePatch()
          Line patch.
 double getDefaultPatchHeight()
          Patch height in points.
 double getDefaultPatchWidth()
          Patch width in points.
 double getGroupGap()
          Vertical distance in points between legend groups.
 double getHeadingGap()
          Vertical distance in points between a heading and the legend graphics that follow.
 double getHorizontalItemGap()
          Horizontal distance in points between legend item columns.
 double getHorizontalPatchGap()
          Horizontal distance in points between a patch and the legend graphics before and after.
 double getLayerNameGap()
          Vertical distance in points between layer names and the legend graphics that follow.
 double getTextGap()
          Horizontal distance in points between labels and descriptions.
 double getTitleGap()
          Vertical distance in points between title and first legend item.
 int getTitlePosition()
          Legend title position.
 ITextSymbol getTitleSymbol()
          Text symbol used to draw the legend title.
 double getVerticalItemGap()
          Vertical distance in points between legend items.
 double getVerticalPatchGap()
          Vertical distance in points between patches.
 boolean isShowTitle()
          Indicates if title is visibile.
 void scale(double xScale, double yScale)
          Multiply all distances, gaps, and size property values on this interface by the specified scale factors.
 void setDefaultAreaPatch(IAreaPatch patch)
          Area patch.
 void setDefaultLinePatch(ILinePatch patch)
          Line patch.
 void setDefaultPatchHeight(double height)
          Patch height in points.
 void setDefaultPatchWidth(double width)
          Patch width in points.
 void setGroupGap(double gap)
          Vertical distance in points between legend groups.
 void setHeadingGap(double gap)
          Vertical distance in points between a heading and the legend graphics that follow.
 void setHorizontalItemGap(double gap)
          Horizontal distance in points between legend item columns.
 void setHorizontalPatchGap(double gap)
          Horizontal distance in points between a patch and the legend graphics before and after.
 void setLayerNameGap(double gap)
          Vertical distance in points between layer names and the legend graphics that follow.
 void setShowTitle(boolean showTitle)
          Indicates if title is visibile.
 void setTextGap(double gap)
          Horizontal distance in points between labels and descriptions.
 void setTitleGap(double gap)
          Vertical distance in points between title and first legend item.
 void setTitlePosition(int pos)
          Legend title position.
 void setTitleSymbol(ITextSymbol symbol)
          Text symbol used to draw the legend title.
 void setVerticalItemGap(double gap)
          Vertical distance in points between legend items.
 void setVerticalPatchGap(double gap)
          Vertical distance in points between patches.
 

Method Detail

isShowTitle

boolean isShowTitle()
                    throws IOException,
                           AutomationException
Indicates if title is visibile.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setShowTitle

void setShowTitle(boolean showTitle)
                  throws IOException,
                         AutomationException
Indicates if title is visibile.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getTitleSymbol

ITextSymbol getTitleSymbol()
                           throws IOException,
                                  AutomationException
Text symbol used to draw the legend title.

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.

setTitleSymbol

void setTitleSymbol(ITextSymbol symbol)
                    throws IOException,
                           AutomationException
Text symbol used to draw the legend title.

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.

getTitlePosition

int getTitlePosition()
                     throws IOException,
                            AutomationException
Legend title position.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.carto.esriRectanglePosition constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTitlePosition

void setTitlePosition(int pos)
                      throws IOException,
                             AutomationException
Legend title position.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
pos - A com.esri.arcgis.carto.esriRectanglePosition constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTitleGap

double getTitleGap()
                   throws IOException,
                          AutomationException
Vertical distance in points between title and first legend item.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setTitleGap

void setTitleGap(double gap)
                 throws IOException,
                        AutomationException
Vertical distance in points between title and first legend item.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getVerticalItemGap

double getVerticalItemGap()
                          throws IOException,
                                 AutomationException
Vertical distance in points between legend items.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setVerticalItemGap

void setVerticalItemGap(double gap)
                        throws IOException,
                               AutomationException
Vertical distance in points between legend items.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getHorizontalItemGap

double getHorizontalItemGap()
                            throws IOException,
                                   AutomationException
Horizontal distance in points between legend item columns. Used for legends that have more than one column.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setHorizontalItemGap

void setHorizontalItemGap(double gap)
                          throws IOException,
                                 AutomationException
Horizontal distance in points between legend item columns. Used for legends that have more than one column.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getLayerNameGap

double getLayerNameGap()
                       throws IOException,
                              AutomationException
Vertical distance in points between layer names and the legend graphics that follow.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setLayerNameGap

void setLayerNameGap(double gap)
                     throws IOException,
                            AutomationException
Vertical distance in points between layer names and the legend graphics that follow.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getGroupGap

double getGroupGap()
                   throws IOException,
                          AutomationException
Vertical distance in points between legend groups.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setGroupGap

void setGroupGap(double gap)
                 throws IOException,
                        AutomationException
Vertical distance in points between legend groups.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getHeadingGap

double getHeadingGap()
                     throws IOException,
                            AutomationException
Vertical distance in points between a heading and the legend graphics that follow.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setHeadingGap

void setHeadingGap(double gap)
                   throws IOException,
                          AutomationException
Vertical distance in points between a heading and the legend graphics that follow.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getTextGap

double getTextGap()
                  throws IOException,
                         AutomationException
Horizontal distance in points between labels and descriptions.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setTextGap

void setTextGap(double gap)
                throws IOException,
                       AutomationException
Horizontal distance in points between labels and descriptions.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getVerticalPatchGap

double getVerticalPatchGap()
                           throws IOException,
                                  AutomationException
Vertical distance in points between patches.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setVerticalPatchGap

void setVerticalPatchGap(double gap)
                         throws IOException,
                                AutomationException
Vertical distance in points between patches.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getHorizontalPatchGap

double getHorizontalPatchGap()
                             throws IOException,
                                    AutomationException
Horizontal distance in points between a patch and the legend graphics before and after.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setHorizontalPatchGap

void setHorizontalPatchGap(double gap)
                           throws IOException,
                                  AutomationException
Horizontal distance in points between a patch and the legend graphics before and after.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDefaultPatchWidth

double getDefaultPatchWidth()
                            throws IOException,
                                   AutomationException
Patch width in points. Can be overridden by the LegendItem.

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.

setDefaultPatchWidth

void setDefaultPatchWidth(double width)
                          throws IOException,
                                 AutomationException
Patch width in points. Can be overridden by the LegendItem.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDefaultPatchHeight

double getDefaultPatchHeight()
                             throws IOException,
                                    AutomationException
Patch height in points. Can be overridden by the LegendItem.

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.

setDefaultPatchHeight

void setDefaultPatchHeight(double height)
                           throws IOException,
                                  AutomationException
Patch height in points. Can be overridden by the LegendItem.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDefaultLinePatch

ILinePatch getDefaultLinePatch()
                               throws IOException,
                                      AutomationException
Line patch. Can be overridden by the LegendItem.

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

setDefaultLinePatch

void setDefaultLinePatch(ILinePatch patch)
                         throws IOException,
                                AutomationException
Line patch. Can be overridden by the LegendItem.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDefaultAreaPatch

IAreaPatch getDefaultAreaPatch()
                               throws IOException,
                                      AutomationException
Area patch. Can be overridden by the LegendItem.

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

setDefaultAreaPatch

void setDefaultAreaPatch(IAreaPatch patch)
                         throws IOException,
                                AutomationException
Area patch. Can be overridden by the LegendItem.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

scale

void scale(double xScale,
           double yScale)
           throws IOException,
                  AutomationException
Multiply all distances, gaps, and size property values on this interface by the specified scale factors.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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