|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IGraphicsContainerSelect
Provides access to members that control graphic container selection.
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.
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 |
---|
void selectElement(IElement element) throws IOException, AutomationException
Adds the specified element to the element selection and fires the IActiveViewEvents::SelectionChanged event.
element
- A reference to a com.esri.arcgis.carto.IElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void selectElements(IEnumElement elements) throws IOException, AutomationException
Adds the specified elements to the element selection and fires the IActiveViewEvents::SelectionChanged event.
elements
- A reference to a com.esri.arcgis.carto.IEnumElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void selectAllElements() throws IOException, AutomationException
Selects all elements in the container and fires the IActiveViewEvents::SelectionChanged event.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void unselectElement(IElement element) throws IOException, AutomationException
Removes the specified element from the element selection and fires the IActiveViewEvents::SelectionChanged event.
element
- A reference to a com.esri.arcgis.carto.IElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void unselectElements(IEnumElement elements) throws IOException, AutomationException
Removes the specified elements from the element selection and fires the IActiveViewEvents::SelectionChanged event.
elements
- A reference to a com.esri.arcgis.carto.IEnumElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void unselectAllElements() throws IOException, AutomationException
Clears the element selection and fires the IActiveViewEvents::SelectionChanged event.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnumElement getSelectedElements() throws IOException, AutomationException
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).
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IViewManager.getElementSelection()
int getElementSelectionCount() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IElement selectedElement(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISelectionTracker selectionTracker(int index) throws IOException, AutomationException
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.
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IElement
boolean elementSelected(IElement element) throws IOException, AutomationException
Returns TRUE if the specified element is selected.
element
- A reference to a com.esri.arcgis.carto.IElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IElement getDominantElement() throws IOException, AutomationException
The dominant element is by default the first element selected. The alignment commands make use of the dominant element to arrange elements more precisely.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setDominantElementByRef(IElement dominantItem) throws IOException, AutomationException
dominantItem
- A reference to a com.esri.arcgis.carto.IElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnvelope getSelectionBounds(IDisplay display) throws IOException, AutomationException
display
- A reference to a com.esri.arcgis.display.IDisplay (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |