com.esri.arcgis.carto
Interface IElementCollection2

All Superinterfaces:
Serializable
All Known Implementing Classes:
ElementCollection

public interface IElementCollection2
extends Serializable

Provides access to members that control the Graphics element collection.

Product Availability

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


Method Summary
 void add(IElement element, int linkedFeatureID, int annotationClassID, int status)
          Adds an element to the collection.
 void clear()
          Removes all the elements in the collection.
 int getCount()
          Number of elements in the collection.
 void queryItem(int index, IElement[] element, int[] linkedFeatureID, int[] annotationClassID, int[] status)
          Element at the given index.
 void remove(IElement element)
          Remove an element from the collection.
 

Method Detail

add

void add(IElement element,
         int linkedFeatureID,
         int annotationClassID,
         int status)
         throws IOException,
                AutomationException
Adds an element to the collection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
element - A reference to a com.esri.arcgis.carto.IElement (in)
linkedFeatureID - The linkedFeatureID (in, optional, pass 0 if not required)
annotationClassID - The annotationClassID (in, optional, pass -1 if not required)
status - A com.esri.arcgis.carto.esriAnnotationStatus constant (in, optional, pass 0 if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCount

int getCount()
             throws IOException,
                    AutomationException
Number of elements 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.

queryItem

void queryItem(int index,
               IElement[] element,
               int[] linkedFeatureID,
               int[] annotationClassID,
               int[] status)
               throws IOException,
                      AutomationException
Element at the given index.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
index - The index (in)
element - A reference to a com.esri.arcgis.carto.IElement (out: use single element array)
linkedFeatureID - The linkedFeatureID (out: use single element array, optional, pass single element of null if not required)
annotationClassID - The annotationClassID (out: use single element array, optional, pass single element of null if not required)
status - A com.esri.arcgis.carto.esriAnnotationStatus constant (out: use single element array, optional, pass single element of null if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clear

void clear()
           throws IOException,
                  AutomationException
Removes all the elements 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.

remove

void remove(IElement element)
            throws IOException,
                   AutomationException
Remove an element from the collection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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