com.esri.arcgis.carto
Interface IScaleText

All Superinterfaces:
IMapSurround, Serializable
All Known Implementing Classes:
ScaleText

public interface IScaleText
extends IMapSurround, Serializable

Provides access to members that control the scale text.

Superseded By

IScaleText2

Remarks

ScaleText is essentially a text element that describes the map’s scale. One example of scale text is “1 inch equals 2,400 miles”.
The interface IScaleText controls the format of the string that is added as a map surround element.

Text returns the text displayed e.g. “1 inch equals 2,400 miles”.

Symbol is a text symbol that you may access to modify its appearance.

NumberFormat is an INumberFormat that allows you for instance to modify the number of decimals used to display the map units.

The MapUnits and PageUnits are esriUnits and will initially reflect the current map units and page layout units. They can be set to any units to suit your needs.

The MapUnitLabel and PageUnitLabel are the labels describing the units used in the scale text. For instance, "kilometers" which you may change to "km" by setting the MapUnitLabel property.

The Style property is an esriScaleTextStyleEnum and can take two values defining if the scale text type is relative - “1 inch equals 2,400 miles” - or absolute - "1:200,000". Relative scale text is the default.

The Format property is not currently implemented.

There is no way to change the text in any other way than those listed here except by converting the Scale Text to graphics after it has been created or reading the text it returns and create your own text element to display it but the resulting scale will not be linked to the scale of the map frame anymore.

Product Availability

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


Method Summary
 String getFormat()
          Format of the scale text.
 String getMapUnitLabel()
          Map unit label of the scale text.
 int getMapUnits()
          Map units of the scale text.
 INumberFormat getNumberFormat()
          Number formatting.
 String getPageUnitLabel()
          Page unit label of the scale text.
 int getPageUnits()
          Page units of the scale text.
 int getStyle()
          Style of the scale text.
 ITextSymbol getSymbol()
          Symbol of the scale text.
 String getText()
          The scale text.
 void setFormat(String format)
          Format of the scale text.
 void setMapUnitLabel(String label)
          Map unit label of the scale text.
 void setMapUnits(int units)
          Map units of the scale text.
 void setNumberFormat(INumberFormat format)
          Number formatting.
 void setPageUnitLabel(String label)
          Page unit label of the scale text.
 void setPageUnits(int units)
          Page units of the scale text.
 void setStyle(int style)
          Style of the scale text.
 void setSymbol(ITextSymbol symbol)
          Symbol of the scale text.
 
Methods inherited from interface com.esri.arcgis.carto.IMapSurround
delayEvents, draw, fitToBounds, getIcon, getMap, getName, queryBounds, refresh, setMapByRef, setName
 

Method Detail

getText

String getText()
               throws IOException,
                      AutomationException
The scale text.

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.

setSymbol

void setSymbol(ITextSymbol symbol)
               throws IOException,
                      AutomationException
Symbol of the scale text.

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.

getSymbol

ITextSymbol getSymbol()
                      throws IOException,
                             AutomationException
Symbol of the scale text.

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.

setStyle

void setStyle(int style)
              throws IOException,
                     AutomationException
Style of the scale text.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getStyle

int getStyle()
             throws IOException,
                    AutomationException
Style of the scale text.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setFormat

void setFormat(String format)
               throws IOException,
                      AutomationException
Format of the scale text. Style must be set to custom.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getFormat

String getFormat()
                 throws IOException,
                        AutomationException
Format of the scale text. Style must be set to custom.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setPageUnits

void setPageUnits(int units)
                  throws IOException,
                         AutomationException
Page units of the scale text. Style must be set to custom.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getPageUnits

int getPageUnits()
                 throws IOException,
                        AutomationException
Page units of the scale text. Style must be set to custom.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setMapUnits

void setMapUnits(int units)
                 throws IOException,
                        AutomationException
Map units of the scale text. Style must be set to custom.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getMapUnits

int getMapUnits()
                throws IOException,
                       AutomationException
Map units of the scale text. Style must be set to custom.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setPageUnitLabel

void setPageUnitLabel(String label)
                      throws IOException,
                             AutomationException
Page unit label of the scale text. Style must be set to relative.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getPageUnitLabel

String getPageUnitLabel()
                        throws IOException,
                               AutomationException
Page unit label of the scale text. Style must be set to relative.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setMapUnitLabel

void setMapUnitLabel(String label)
                     throws IOException,
                            AutomationException
Map unit label of the scale text. Style must be set to relative.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getMapUnitLabel

String getMapUnitLabel()
                       throws IOException,
                              AutomationException
Map unit label of the scale text. Style must be set to relative.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setNumberFormat

void setNumberFormat(INumberFormat format)
                     throws IOException,
                            AutomationException
Number formatting.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getNumberFormat

INumberFormat getNumberFormat()
                              throws IOException,
                                     AutomationException
Number formatting.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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