com.esri.arcgis.carto
Interface IMultiPartTextElement

All Superinterfaces:
Serializable
All Known Implementing Classes:
PMFTitleTextElement, TextElement

public interface IMultiPartTextElement
extends Serializable

Provides access to methods and properties for maintaining multipart elements.

Description

IMultipartTextElement provides access to the methods to maintain and create TextElements that are multipart. A TextElement is multipart when IMultiPartTextElement::IsMultipart returns True.

A multipart text element features an individual location for each word in the TextElement's text string. This is achieved by storing the individual geometry for each element in order in a GeometryBag, which is geometry for the TextElement. The GeometryBag may contain the typical TextElement geometries of Point and Polyline as well as a Multipoint. A multipart TextElement is draw by the TextSymbol with the WordTextPath. When a specific word needs to be drawn via the OverposterTextPath, a multipoint will be stored for that word in the GeometryBag so it can be identified by the WordTextPath.


To convert an existing TextElement to multipart, simply call the ConvertToMultiPart method. Likewise, to convert a multipart element back to a single part element, call ConvertToSinglePart.

When the text string for a multipart TextElement is updated, the number of geometries in the GeometryBag and the word count are kept in sync automatically. Adding an extra word will simply add an extra geometry, where removing a word will remove a geometry. Replacing a word will cause the new word to draw on the same geometry.

Product Availability

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


Method Summary
 void convertToMultiPart(IDisplay pDisplay)
          Converts the current element into a multipart element.
 void convertToSinglePart()
          Converts the current element into a single part element.
 void deletePart(int index)
          Delete a part in the multipart element at the specified index.
 int getPartCount()
          The number of parts in the multipart element.
 void insertPart(int index, String text, IGeometry geometry)
          Insert a part in the multipart element at the specified index.
 boolean isMultipart()
          Indicates if the element is multi part.
 IElement queryPart(int index)
          Returns the part in the multipart element at the specified index.
 void replacePart(int index, String text, IGeometry geometry)
          Replace a part in the multipart element at the specified index.
 void synchronizeParts(IDisplay pDisplay)
          Synchronize the geometry with the text of the element.
 

Method Detail

convertToMultiPart

void convertToMultiPart(IDisplay pDisplay)
                        throws IOException,
                               AutomationException
Converts the current element into a multipart element.

Remarks

When calling this method for a text element of an annotation feature in an annotation feature class, pass in the display object obtained via IAnnotationClassExtension2::Display on the feature classes AnnotationFeatureClassExtension. This will ensure that the Display is correctly configured for use.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

convertToSinglePart

void convertToSinglePart()
                         throws IOException,
                                AutomationException
Converts the current element into a single part element.

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.

isMultipart

boolean isMultipart()
                    throws IOException,
                           AutomationException
Indicates if the element is multi part.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The isMultiPartElement
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPartCount

int getPartCount()
                 throws IOException,
                        AutomationException
The number of parts in the multipart element.

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.

queryPart

IElement queryPart(int index)
                   throws IOException,
                          AutomationException
Returns the part in the multipart element at the specified index.

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.

replacePart

void replacePart(int index,
                 String text,
                 IGeometry geometry)
                 throws IOException,
                        AutomationException
Replace a part in the multipart element at the specified index.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

insertPart

void insertPart(int index,
                String text,
                IGeometry geometry)
                throws IOException,
                       AutomationException
Insert a part in the multipart element at the specified index.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

deletePart

void deletePart(int index)
                throws IOException,
                       AutomationException
Delete a part in the multipart element at the specified index.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

synchronizeParts

void synchronizeParts(IDisplay pDisplay)
                      throws IOException,
                             AutomationException
Synchronize the geometry with the text of the element.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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