com.esri.arcgis.carto
Interface IGraphicsContainerSelect

All Superinterfaces:
Serializable
All Known Implementing Classes:
CompositeGraphicsLayer, FDOGraphicsLayer, Map, PageLayout

public interface IGraphicsContainerSelect
extends Serializable

Provides access to members that control graphic container selection.

Remarks

Most objects which are considered graphics containers, the PageLayout and Map objects for example, implement the IGraphicsContainerSelect interface to expose additional members for managing their element selection.

For example, use IGraphicsContainerSelect::UnselectAllElements to clear an object's graphic element selection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
IActiveView.getSelection(), IGraphicsContainerSelect, IEnumElement, IGraphicsContainer

Method Summary
 boolean elementSelected(IElement element)
          Indicates if the element is selected.
 IElement getDominantElement()
          Dominant element.
 int getElementSelectionCount()
          The number of selected elements.
 IEnumElement getSelectedElements()
          The selected elements.
 IEnvelope getSelectionBounds(IDisplay display)
          The bounds of the selection.
 void selectAllElements()
          Selects all elements.
 IElement selectedElement(int index)
          Returns the nth selected element.
 void selectElement(IElement element)
          Selects the specified element.
 void selectElements(IEnumElement elements)
          Selects the specified elements.
 ISelectionTracker selectionTracker(int index)
          Returns the tracker for the nth selected element.
 void setDominantElementByRef(IElement dominantItem)
          Dominant element.
 void unselectAllElements()
          Unselects all elements.
 void unselectElement(IElement element)
          Unselects the specified element.
 void unselectElements(IEnumElement elements)
          Unselects the specified elements.
 

Method Detail

selectElement

void selectElement(IElement element)
                   throws IOException,
                          AutomationException
Selects the specified element.

Remarks

Adds the specified element to the element selection and fires the IActiveViewEvents::SelectionChanged event.

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.

selectElements

void selectElements(IEnumElement elements)
                    throws IOException,
                           AutomationException
Selects the specified elements.

Remarks

Adds the specified elements to the element selection and fires the IActiveViewEvents::SelectionChanged event.

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.

selectAllElements

void selectAllElements()
                       throws IOException,
                              AutomationException
Selects all elements.

Remarks

Selects all elements in the container and fires the IActiveViewEvents::SelectionChanged event.

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.

unselectElement

void unselectElement(IElement element)
                     throws IOException,
                            AutomationException
Unselects the specified element.

Remarks

Removes the specified element from the element selection and fires the IActiveViewEvents::SelectionChanged event.

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.

unselectElements

void unselectElements(IEnumElement elements)
                      throws IOException,
                             AutomationException
Unselects the specified elements.

Remarks

Removes the specified elements from the element selection and fires the IActiveViewEvents::SelectionChanged event.

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.

unselectAllElements

void unselectAllElements()
                         throws IOException,
                                AutomationException
Unselects all elements.

Remarks

Clears the element selection and fires the IActiveViewEvents::SelectionChanged event.

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.

getSelectedElements

IEnumElement getSelectedElements()
                                 throws IOException,
                                        AutomationException
The selected elements.

Remarks

Returns an IEnumElement containing all of the selected elements.

An IEnumElement reference to the element selection is also available from IViewManager::ElementSelection and IActiveView::Selection (QI from ISelection).

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.
See Also:
IViewManager.getElementSelection()

getElementSelectionCount

int getElementSelectionCount()
                             throws IOException,
                                    AutomationException
The number of selected elements.

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.

selectedElement

IElement selectedElement(int index)
                         throws IOException,
                                AutomationException
Returns the nth selected element. Use Selection count to get the number of selected elements.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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.

selectionTracker

ISelectionTracker selectionTracker(int index)
                                   throws IOException,
                                          AutomationException
Returns the tracker for the nth selected element. Use Selection count to get the number of selected elements.

Remarks

Elements have associated selection tracker objects which provide reshaping functionality. For example, in ArcMap after adding an element, the element is drawn with a selection tracker around it and users can then drag one of the selection handles on the selection tracker to modify the element's shape.

There are several types of selection tracker objects including EnvelopeTracker, MarkerTracker, PointTracker, and PolygonTracker. When an element is first selected, an EnvelopeTracker is created for it. However, if the element has its IElementEditVertices::MovingVertices property set to TRUE, then the geometry of the element dictates the type of selection tracker created. For example, a line element will create a LineTracker.

IElement::SelectionTracker checks if the elements IElementEditVertices::MovingVertices property is set to TRUE; if so, IElementEditVertices::GetMoveVerticesSelectionTracker is called to create the appropriate tracker object for the element. If MovingVertices returns FALSE, then an EnvelopeTracker is created for the element.

In ArcMap, selecting an element creates an EnvelopeTracker but the 'Edit Vertices' command swaps the it out with a PolygonTracker or LineTracker. Some elements such as a MarkerElement, CircleElement, EllipseElement, and RectangleElement, only create EnvelopeTrackers and the vertices of the these elements cannot be edited.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

elementSelected

boolean elementSelected(IElement element)
                        throws IOException,
                               AutomationException
Indicates if the element is selected.

Remarks

Returns TRUE if the specified element is selected.

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

getDominantElement

IElement getDominantElement()
                            throws IOException,
                                   AutomationException
Dominant element.

Remarks

The dominant element is by default the first element selected. The alignment commands make use of the dominant element to arrange elements more precisely.

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

setDominantElementByRef

void setDominantElementByRef(IElement dominantItem)
                             throws IOException,
                                    AutomationException
Dominant element.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
dominantItem - 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.

getSelectionBounds

IEnvelope getSelectionBounds(IDisplay display)
                             throws IOException,
                                    AutomationException
The bounds of the selection.

Product Availability

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

Parameters:
display - A reference to a com.esri.arcgis.display.IDisplay (in)
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.