|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILegend
Provides access to members that control a legend.
Use this interface to modify a legend and access its subparts.
A legend is mostly a collection of legend items, one for each layer of the map. See the ILegendItem documentation for information about these. ILegend provides access to and manages the legend’s items with the Item and ItemCount properties as well as the AddItem, InsertItem, RemoveItem and ClearItems methods.
The format of the legend is managed by the LegendFormat object. The Format properties gives access to this object through the ILegendFormat interface. ILegend also manages a few of the legend properties such as the Title . When changing the properties of an existing legend, you must call Refresh to have the changes reflected in the layout.
Finally the AutoAdd, AutoReorder and AutoVisibility properties are used to synchronize the aspect and ordering of the legend with the TOC. The default value for this property is True.
Method Summary | |
---|---|
void |
addItem(ILegendItem item)
Adds a new item to the legend (to the end of the list). |
void |
clearItems()
Removes all items from the legend. |
ILegendFormat |
getFormat()
The formatting options for the legend (can be stored in the style gallery). |
ILegendItem |
getItem(int index)
The specified item from the legend. |
int |
getItemCount()
Number of items in the legend. |
String |
getTitle()
Title. |
void |
insertItem(int index,
ILegendItem item)
Inserts a new item into the legend (at the location specified by index). |
boolean |
isAutoAdd()
Indicates if a new item should be added when a new layer is added to the map. |
boolean |
isAutoReorder()
Indicates if the legend items should be kept in the same order as the layers. |
boolean |
isAutoVisibility()
Indicates if items should be shown only when associated layers are visible. |
boolean |
isFlowRight()
Reserved for future use. |
void |
removeItem(int index)
Removes the specified item from the legend. |
void |
setAutoAdd(boolean autoAdd)
Indicates if a new item should be added when a new layer is added to the map. |
void |
setAutoReorder(boolean autoReorder)
Indicates if the legend items should be kept in the same order as the layers. |
void |
setAutoVisibility(boolean autoVisibility)
Indicates if items should be shown only when associated layers are visible. |
void |
setFlowRight(boolean flag)
Reserved for future use. |
void |
setFormatByRef(ILegendFormat legendFormat)
The formatting options for the legend (can be stored in the style gallery). |
void |
setTitle(String title)
Title. |
Methods inherited from interface com.esri.arcgis.carto.IMapSurround |
---|
delayEvents, draw, fitToBounds, getIcon, getMap, getName, queryBounds, refresh, setMapByRef, setName |
Method Detail |
---|
ILegendFormat getFormat() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFormatByRef(ILegendFormat legendFormat) throws IOException, AutomationException
legendFormat
- A reference to a com.esri.arcgis.carto.ILegendFormat (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getTitle() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setTitle(String title) throws IOException, AutomationException
title
- The title (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isAutoAdd() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setAutoAdd(boolean autoAdd) throws IOException, AutomationException
autoAdd
- The autoAdd (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isAutoReorder() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setAutoReorder(boolean autoReorder) throws IOException, AutomationException
autoReorder
- The autoReorder (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isAutoVisibility() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setAutoVisibility(boolean autoVisibility) throws IOException, AutomationException
autoVisibility
- The autoVisibility (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isFlowRight() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFlowRight(boolean flag) throws IOException, AutomationException
flag
- The flag (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getItemCount() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ILegendItem getItem(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addItem(ILegendItem item) throws IOException, AutomationException
item
- A reference to a com.esri.arcgis.carto.ILegendItem (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void insertItem(int index, ILegendItem item) throws IOException, AutomationException
index
- The index (in)item
- A reference to a com.esri.arcgis.carto.ILegendItem (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void removeItem(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void clearItems() throws IOException, AutomationException
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 |