com.esri.arcgis.display
Interface ITextSymbol

All Superinterfaces:
Serializable
All Known Subinterfaces:
IFormattedTextSymbol, ISimpleTextSymbol
All Known Implementing Classes:
TextSymbol

public interface ITextSymbol
extends Serializable

Provides access to members that control text symbols.

Description

ITextSymbol is the generic interface for properties of IFormattedTextSymbol and ISimpleTextSymbol.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
IFormattedTextSymbol, ITextSymbol, ISimpleTextSymbol

Method Summary
 double getAngle()
          Text baseline angle.
 IColor getColor()
          Text color.
 Font getFont()
          Text font.
 int getHorizontalAlignment()
          Horizontal alignment style.
 double getSize()
          Text size.
 String getText()
          Text to draw.
 void getTextSize(int hDC, ITransformation transformation, String text, double[] xSize, double[] ySize)
          Gets the x and y dimensions of 'text' in points (1/72 inch).
 int getVerticalAlignment()
          Vertical alignment style.
 boolean isRightToLeft()
          Indicates if the text is drawn from right to left.
 void setAngle(double angle)
          Text baseline angle.
 void setColor(IColor color)
          Text color.
 void setFont(Font fontDisp)
          Text font.
 void setHorizontalAlignment(int horizAlignment)
          Horizontal alignment style.
 void setRightToLeft(boolean rightToLeft)
          Indicates if the text is drawn from right to left.
 void setSize(double size)
          Text size.
 void setText(String text)
          Text to draw.
 void setVerticalAlignment(int vertAlignment)
          Vertical alignment style.
 

Method Detail

getFont

Font getFont()
             throws IOException,
                    AutomationException
Text font.

Description

Font is the font that an ITextSymbol uses. Use the IFontDisp interface to set the font.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.support.ms.stdole.Font (A com.esri.arcgis.support.ms.stdole.Font COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFont

void setFont(Font fontDisp)
             throws IOException,
                    AutomationException
Text font.

Description

Font is the font that an ITextSymbol uses. Use the IFontDisp interface to set the font.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
fontDisp - A reference to a com.esri.arcgis.support.ms.stdole.Font (A com.esri.arcgis.support.ms.stdole.Font COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSize

double getSize()
               throws IOException,
                      AutomationException
Text size.

Description

Size is the size in points (approx. 1/72 inch) for an ITextSymbol .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setSize

void setSize(double size)
             throws IOException,
                    AutomationException
Text size.

Description

Size is the size in points (approx. 1/72 inch) for an ITextSymbol .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getColor

IColor getColor()
                throws IOException,
                       AutomationException
Text color.

Description

Color is the color for a TextSymbol object. Any IColor object can be used.

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.IColor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IHsvColor, IHlsColor

setColor

void setColor(IColor color)
              throws IOException,
                     AutomationException
Text color.

Description

Color is the color for a TextSymbol object. Any IColor object can be used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
color - A reference to a com.esri.arcgis.display.IColor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IHsvColor, IHlsColor

getVerticalAlignment

int getVerticalAlignment()
                         throws IOException,
                                AutomationException
Vertical alignment style.

Description

VerticalAlignment is the enumeration that defines how text is vertically aligned. There are four options: esriTVABaseline, esriTVABottom, esriTVACenter, and esriTVATop. esriTVABaseline is the default VerticalAlignment.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.display.esriTextVerticalAlignment constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setVerticalAlignment

void setVerticalAlignment(int vertAlignment)
                          throws IOException,
                                 AutomationException
Vertical alignment style.

Description

VerticalAlignment is the enumeration that defines how text is vertically aligned. There are four options: esriTVABaseline , esriTVABottom , esriTVACenter , and esriTVATop . esriTVABaseline is the default VerticalAlignment .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
vertAlignment - A com.esri.arcgis.display.esriTextVerticalAlignment constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHorizontalAlignment

int getHorizontalAlignment()
                           throws IOException,
                                  AutomationException
Horizontal alignment style.

Description

HorizontalAlignment is the horizontal alignment that will be applied to text that contains multiple lines. There are four options: esriTHACenter , esriTHAFull , esriTHALeft , and esriTHARight . The default option is esriTHALeft .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.display.esriTextHorizontalAlignment constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setHorizontalAlignment

void setHorizontalAlignment(int horizAlignment)
                            throws IOException,
                                   AutomationException
Horizontal alignment style.

Description

HorizontalAlignment is the horizontal alignment that will be applied to text that contains multiple lines. There are four options: esriTHACenter , esriTHAFull , esriTHALeft , and esriTHARight . The default option is esriTHALeft .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
horizAlignment - A com.esri.arcgis.display.esriTextHorizontalAlignment constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAngle

double getAngle()
                throws IOException,
                       AutomationException
Text baseline angle.

Description

Angle is the Angle in degrees that the entire line of text is displayed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setAngle

void setAngle(double angle)
              throws IOException,
                     AutomationException
Text baseline angle.

Description

Angle is the Angle in degrees that the entire line of text is displayed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isRightToLeft

boolean isRightToLeft()
                      throws IOException,
                             AutomationException
Indicates if the text is drawn from right to left.

Description

RightToLeft is whether the text is to be displayed in a right to left manner. The default value is False.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setRightToLeft

void setRightToLeft(boolean rightToLeft)
                    throws IOException,
                           AutomationException
Indicates if the text is drawn from right to left.

Description

RightToLeft is whether the text is to be displayed in a right to left manner. The default value is False.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getText

String getText()
               throws IOException,
                      AutomationException
Text to draw.

Description

Text is the text string that will be drawn using the other properties of the ITextSymbol. This property is only used for low level drawing of a TextSymbol on a display and is not typically used when TextSymbols are used for TextElements. In the case of TextElements, the element stores the text that is used during drawtime.

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 to draw.

Description

Text is the text string that will be drawn using the other properties of the ITextSymbol. This property is only used for low level drawing of a TextSymbol on a display and is not typically used when TextSymbols are used for TextElements. In the case of TextElements, the element stores the text that is used during drawtime.

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.

getTextSize

void getTextSize(int hDC,
                 ITransformation transformation,
                 String text,
                 double[] xSize,
                 double[] ySize)
                 throws IOException,
                        AutomationException
Gets the x and y dimensions of 'text' in points (1/72 inch).

Description

GetTextSize assigns by reference the x and y dimensions of a ITextSymbol given the device context, Transformation, and Text that will be used. This is helpful in planning where to place graphic elements on the map sheet.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
hDC - The hDC (A COM typedef) (in)
transformation - A reference to a com.esri.arcgis.geometry.ITransformation (in)
text - The text (in)
xSize - The xSize (out: use single element array)
ySize - The ySize (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.