com.esri.arcgis.carto
Class ILegendClassProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.carto.ILegendClassProxy
All Implemented Interfaces:
ILegendClass, Externalizable, Serializable

public class ILegendClassProxy
extends com.esri.arcgis.interop.Dispatch
implements ILegendClass, Serializable

Provides access to members that control the legend/TOC entry for a renderer class.

Remarks

There are typically many LegendClass objects in a LegendGroup. Each legend class contains a symbol and descriptive text strings form of a Label and Description. The Label appears in the table of contents, and the label and description can appear in the legend.

If a legend group is editable, then the symbol and label for the label classes contained by the legend group can be edited in the table of contents. Changes to symbols symbol will change the renderer's symbology and the map will refresh to reflect this change. Changes to labels will change the content of any legends that contain the layer.

The typically route for modifying renderer appeance through code is to go to the renderer objects themselves. For example, to change the simple renderer symbol, label and description fields, use the methods and properties of ISimpleRenderer in preference to the legend class object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, E
 
Constructor Summary
  ILegendClassProxy()
           
  ILegendClassProxy(Object obj)
           
protected ILegendClassProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 String getDescription()
          Legend class description.
 ILegendClassFormat getFormat()
          Optional.
 String getLabel()
          Legend class label.
 ISymbol getSymbol()
          Legend class symbol.
 void readExternal(ObjectInput in)
           
 void removeListener(String iidStr, Object theListener)
           
 void setDescription(String label)
          Legend class description.
 void setFormat(ILegendClassFormat format)
          Optional.
 void setLabel(String label)
          Legend class label.
 void setSymbolByRef(ISymbol symbol)
          Legend class symbol.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, queryInterface, release, setNativeMode, setPropertyByName, toString, vtblInvoke
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ILegendClassProxy

public ILegendClassProxy()

ILegendClassProxy

public ILegendClassProxy(Object obj)
                  throws IOException
Throws:
IOException

ILegendClassProxy

protected ILegendClassProxy(Object obj,
                            String iid)
                     throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

getSymbol

public ISymbol getSymbol()
                  throws IOException,
                         AutomationException
Legend class symbol.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSymbol in interface ILegendClass
Returns:
A reference to a com.esri.arcgis.display.ISymbol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSymbolByRef

public void setSymbolByRef(ISymbol symbol)
                    throws IOException,
                           AutomationException
Legend class symbol.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getLabel

public String getLabel()
                throws IOException,
                       AutomationException
Legend class label.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getLabel in interface ILegendClass
Returns:
The label
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLabel

public void setLabel(String label)
              throws IOException,
                     AutomationException
Legend class label.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setLabel in interface ILegendClass
Parameters:
label - The label (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDescription

public String getDescription()
                      throws IOException,
                             AutomationException
Legend class description.

Remarks

The Description does not apear in the table of contents but can appear in the legend depending on the LegendItem that is applied.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDescription in interface ILegendClass
Returns:
The label
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDescription

public void setDescription(String label)
                    throws IOException,
                           AutomationException
Legend class description.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setDescription in interface ILegendClass
Parameters:
label - The label (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFormat

public ILegendClassFormat getFormat()
                             throws IOException,
                                    AutomationException
Optional. If non-null, then layer specifies class formatting information.

Remarks

A layer or renderer can provide legend class formatting information via this property, which makes it possible to store legend formatting information with layers in metadata-like fashion. However this is not normally done. Rather, legend formatting information usually comes from the legend. ILegendItem.LegendClassFormat is used and some patch settings can come from ILegend.LegendFormat .

So, when a legend is created, the code follows this logic:

  1. Check if ILegendClass.Format exists for the layer. If not, use ILegendItem.LegendClassFormat.
  2. For the patch settings, if a setting in ILegendItem.LegendClassFormat is null, then use the default value in ILegend.LegendFormat.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFormat in interface ILegendClass
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.

setFormat

public void setFormat(ILegendClassFormat format)
               throws IOException,
                      AutomationException
Optional. If non-null, then layer specifies class formatting information.

Description

The layer can provide legend class formatting information via ILegendClass.Format. This makes it possible to store legend formatting information with layers in metadata-like fashion. However, layers normally do not provide a LegendClassFormat object. Rather, legend formatting information usually comes from the legend. ILegendItem.LegendClassFormat is used and some patch settings can come from ILegend.LegendFormat .

So, when a legend is created, the code follows this logic:

  1. Check if ILegendClass.Format exists for the layer. If not, use ILegendItem.LegendClassFormat.
  2. For the patch settings, if a setting in ILegendItem.LegendClassFormat is null, then use the default value in ILegend.LegendFormat.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setFormat in interface ILegendClass
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.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class com.esri.arcgis.interop.Dispatch
Throws:
IOException
ClassNotFoundException