com.esri.arcgis.carto
Interface ITextElement

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

public interface ITextElement
extends Serializable

Provides access to members that control the Text element.

Remarks

ITextElement is the main interface of the TextElement and ParagraphTextElement objects. The interface is used to manipulate the symbol and text string associated with these element types. The most common method for obtaining a reference to an object that implements ITextElement object is to take an IElement reference from an IGraphicsContainer and check to see if the object supports ITextElement. If you are manipulating TextElements in an annotation feature class, it is recommended that you consult ISymbolCollectionElement for detailed information on the specialized symbol management of text in this situation.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 ITextSymbol getSymbol()
          Text symbol this element uses to draw itself.
 String getText()
          Text being displayed by this element.
 boolean isScaleText()
          Indicates if the text scales with the map.
 void setScaleText(boolean scale)
          Indicates if the text scales with the map.
 void setSymbol(ITextSymbol symbol)
          Text symbol this element uses to draw itself.
 void setText(String text)
          Text being displayed by this element.
 

Method Detail

getSymbol

ITextSymbol getSymbol()
                      throws IOException,
                             AutomationException
Text symbol this element uses to draw itself.

Remarks

The Symbol property returns or sets the ITextSymbol associated with the TextElement. The Symbol property represents the symbology being used to display the text on the map.

The size characteristic of the Symbol property is also affected by the ScaleText property. If this property is set to True, the size will scale along with the current scale of the map. If the ScaleText property is False, then the size will remain constant.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.display.ITextSymbol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSymbol

void setSymbol(ITextSymbol symbol)
               throws IOException,
                      AutomationException
Text symbol this element uses to draw itself.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getText

String getText()
               throws IOException,
                      AutomationException
Text being displayed by this element.

Remarks

The Text property returns or sets the text string used displayed on the map. Use this property to manipulate the string associated with the TextElement.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setText

void setText(String text)
             throws IOException,
                    AutomationException
Text being displayed by this element.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isScaleText

boolean isScaleText()
                    throws IOException,
                           AutomationException
Indicates if the text scales with the map.

Remarks

The ScaleText property specifies whether or not the size of the TextElement should change when the scale of the map changes. If the ScaleText property is set to True, then the size of the text will increase or decrease along with the scale of the map. If the property is False, then the size will remain constant.

The actual size of the text on the screen is based on the Symbol property of the TextElement and the setting of the ScaleText property. When the ScaleText property is True, the size of the TextElement will be a combination of the Symbol property, the reference scale for the layer, and the current scale of the map.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setScaleText

void setScaleText(boolean scale)
                  throws IOException,
                         AutomationException
Indicates if the text scales with the map.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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