com.esri.arcgis.carto
Interface IGroupElement

All Superinterfaces:
Serializable
All Known Implementing Classes:
GroupElement

public interface IGroupElement
extends Serializable

Provides access to members that control the Group element.

Superseded By

IGroupElement3

Description

The GroupElement object contains a collection of elements grouped together so as to be be manipulated by the user as one single element.

Product Availability

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

See Also:
GroupElement

Method Summary
 void addElement(IElement element)
          Adds the given element to the group.
 void clearElements()
          Removes all elements from the group.
 void deleteElement(IElement element)
          Removes the given element from the group.
 IElement getElement(int index)
          Element at the given index of the group.
 int getElementCount()
          Number of elements in the group.
 IEnumElement getElements()
          Elements in the group.
 void setElementsByRef(IEnumElement elements)
          Elements in the group.
 

Method Detail

getElements

IEnumElement getElements()
                         throws IOException,
                                AutomationException
Elements in the group.

Remarks

Elements returns or sets the elements contained in the group. Use this property when you want to enumerate through each element in the group.

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

setElementsByRef

void setElementsByRef(IEnumElement elements)
                      throws IOException,
                             AutomationException
Elements in the group.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getElementCount

int getElementCount()
                    throws IOException,
                           AutomationException
Number of elements in the group.

Remarks

ElementCount returns the number of elements contained within the group.

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.

getElement

IElement getElement(int index)
                    throws IOException,
                           AutomationException
Element at the given index of the group.

Product Availability

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

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

addElement

void addElement(IElement element)
                throws IOException,
                       AutomationException
Adds the given element to the group.

Remarks

AddElement can be used to add additional elements to the group. This method is most commonly used when you want to select a set of elements in the map or layout and programmatically group them together.

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.

deleteElement

void deleteElement(IElement element)
                   throws IOException,
                          AutomationException
Removes the given element from the group.

Remarks

DeleteElement is used to delete the element. If you want to remove the element from the group without deleting it, then it is necessary to maintain the reference to the element and re-add it to the GraphicsContainer after issuing the DeleteElement statement.

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.

clearElements

void clearElements()
                   throws IOException,
                          AutomationException
Removes all elements from the group.

Remarks

ClearElements will delete all elements from the group and the map or layout. This method can be used when you want to remove all elements in the group from the map. IGraphicsContainer::DeleteAllElements will delete all the elements in the map, while IGroupElement::ClearElements will delete all elements in the current group.

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.
See Also:
IGraphicsContainer.deleteAllElements()