com.esri.arcgis.display
Interface ISymbolCollection2

All Superinterfaces:
Serializable
All Known Implementing Classes:
SymbolCollection

public interface ISymbolCollection2
extends Serializable

Provides access to members that control a collection of symbols and id pairs.

Remarks

ISymbolCollection provides access to the members of the symbol collection. This interface is most commonly used to maintain the symbol collection of an AnnotationFeatureClassExtension. Care should be taken when modifying symbols in the collection of an AnnotationFeatureClassExtension. Updating a TextSymbol property for an existing symbol in use that results in a change in the size or shape of a TextElement will result in a disconnect between the drawn symbol and the feature geometry. This can be resolved by updating the out of sync features by calling IFeature::Store, but it is generally recommended that only new symbols should be added. ISymbolCollection2 provides new methods for adding new symbols to the collection and guaranteeing unique symbol IDs. It is recommended that developers use ISymbolCollection2::AddSymbol method to add symbols to the symbol collection. A SymbolCollection must have at least one symbol and the default symbol for any Annotation Class cannot be deleted.

Product Availability

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


Method Summary
 void addSymbol(ISymbol symbol, String name, ISymbolIdentifier2[] symbolID)
          Adds a symbol to the collection.
 int getCount()
          The number of symbols in the collection.
 ISymbol getSymbol(int symbolID)
          The symbol associated with the symbolID.
 void getSymbolIdentifier(int iD, ISymbolIdentifier2[] symbolID)
          Returns the symbol with the given ID.
 ISymbolIdentifier next()
          Returns the next symbolID-symbol pair in the collection.
 void remove(int symbolID)
          Removes the symbolID-symbol pair in the collection.
 void removeAll()
          Removes all the symbolID-symbol pairs in the collection.
 void renameSymbol(int symbolID, String name)
          Renames the symbol with the given ID.
 void replace(int symbolID, ISymbol symbol)
          Replaces the symbol associated with the symbolID.
 void reset()
          Prepares the collection for Next to be called.
 void setSymbolByRef(int symbolID, ISymbol symbol)
          The symbol associated with the symbolID.
 

Method Detail

getSymbol

ISymbol getSymbol(int symbolID)
                  throws IOException,
                         AutomationException
The symbol associated with the symbolID.

Product Availability

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

Parameters:
symbolID - The symbolID (in)
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

void setSymbolByRef(int symbolID,
                    ISymbol symbol)
                    throws IOException,
                           AutomationException
The symbol associated with the symbolID.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
symbolID - The symbolID (in)
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.

reset

void reset()
           throws IOException,
                  AutomationException
Prepares the collection for Next to be called.

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.

next

ISymbolIdentifier next()
                       throws IOException,
                              AutomationException
Returns the next symbolID-symbol pair in the collection.

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

replace

void replace(int symbolID,
             ISymbol symbol)
             throws IOException,
                    AutomationException
Replaces the symbol associated with the symbolID.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
symbolID - The symbolID (in)
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.

remove

void remove(int symbolID)
            throws IOException,
                   AutomationException
Removes the symbolID-symbol pair in the collection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

removeAll

void removeAll()
               throws IOException,
                      AutomationException
Removes all the symbolID-symbol pairs in the collection.

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.

addSymbol

void addSymbol(ISymbol symbol,
               String name,
               ISymbolIdentifier2[] symbolID)
               throws IOException,
                      AutomationException
Adds a symbol to the collection. The ID will be set by the collection.

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.ISymbol (in)
name - The name (in)
symbolID - A reference to a com.esri.arcgis.display.ISymbolIdentifier2 (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSymbolIdentifier

void getSymbolIdentifier(int iD,
                         ISymbolIdentifier2[] symbolID)
                         throws IOException,
                                AutomationException
Returns the symbol with the given ID.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
iD - The iD (in)
symbolID - A reference to a com.esri.arcgis.display.ISymbolIdentifier2 (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

renameSymbol

void renameSymbol(int symbolID,
                  String name)
                  throws IOException,
                         AutomationException
Renames the symbol with the given ID.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getCount

int getCount()
             throws IOException,
                    AutomationException
The number of symbols in the collection.

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.