com.esri.arcgis.controls
Interface IARUnitConverter

All Superinterfaces:
Serializable
All Known Implementing Classes:
ARUnitConverter, IARUnitConverterProxy

public interface IARUnitConverter
extends Serializable

Provides access to members that control the ARUnitConverter.

Description

The IARUnitConverter interface is a starting point for converting values between different units of measure, and converting values, units and locations to strings.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.


Method Summary
 double convertUnits(double dValue, int inUnits, int outUnits)
          Converts the specified value between two units of measure.
 String doubleAsString(double dValue, int nDigits, boolean bSeparators)
          Converts the specified value to a string rounded to a specified number of decimal places.
 String esriUnitsAsAbbreviatedString(int units, int caseAppearance)
          Converts the specified units to a string abbreviation in upper or lower case.
 String esriUnitsAsString(int units, int caseAppearance, boolean bPlural)
          Converts the specified units to strings in upper or lower case.
 void getLocationAsString(IARMap pMap, double xCoord, double yCoord, int displayUnits, String[] sXLocation, String[] sYLocation, String[] sUnits)
          Converts the specified coordinates and units to strings.
 void getLongLatAsString(double longitude, double latitude, int displayUnits, String[] sLongitude, String[] sLatitude, String[] sUnits)
          Converts the specified degree coordinates and units to strings.
 

Method Detail

getLocationAsString

void getLocationAsString(IARMap pMap,
                         double xCoord,
                         double yCoord,
                         int displayUnits,
                         String[] sXLocation,
                         String[] sYLocation,
                         String[] sUnits)
                         throws IOException,
                                AutomationException
Converts the specified coordinates and units to strings.

Description

Converts the specified x map coordinate, y map coordinate and unit of measure into three separate strings.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
pMap - A reference to a com.esri.arcgis.controls.IARMap (in)
xCoord - The xCoord (in)
yCoord - The yCoord (in)
displayUnits - A com.esri.arcgis.controls.esriARUnits constant (in)
sXLocation - The sXLocation (in/out: use single element array)
sYLocation - The sYLocation (in/out: use single element array)
sUnits - The sUnits (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esriUnitsAsString

String esriUnitsAsString(int units,
                         int caseAppearance,
                         boolean bPlural)
                         throws IOException,
                                AutomationException
Converts the specified units to strings in upper or lower case.

Description

Converts the specified units to a string. Specify the case (eg. lower or upper case) of the string and whether the string specifies a single unit or many unit(s). For example, the method could convert the page units into an upper cased string.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
units - A com.esri.arcgis.controls.esriARUnits constant (in)
caseAppearance - A com.esri.arcgis.controls.esriARCaseAppearance constant (in)
bPlural - The bPlural (in)
Returns:
The sUnitString
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

convertUnits

double convertUnits(double dValue,
                    int inUnits,
                    int outUnits)
                    throws IOException,
                           AutomationException
Converts the specified value between two units of measure.

Description

Converts the specfied value from one unit of measure to another unit of measure. For example, the method could convert the height and width of the page layout from its present page units into centimetres.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
dValue - The dValue (in)
inUnits - A com.esri.arcgis.controls.esriARUnits constant (in)
outUnits - A com.esri.arcgis.controls.esriARUnits constant (in)
Returns:
The outValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

doubleAsString

String doubleAsString(double dValue,
                      int nDigits,
                      boolean bSeparators)
                      throws IOException,
                             AutomationException
Converts the specified value to a string rounded to a specified number of decimal places.

Description

Converts the specified value to a string, rounded to the specified number of decimal places. Specify whether the string is to contain separators. The separators are determined by the machines regional settings; typically a comma "," for separating groups of digits and a full stop "." to separate the decimal part. In many countries a comma is conventionally used as a decimal point.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
dValue - The dValue (in)
nDigits - The nDigits (in)
bSeparators - The bSeparators (in)
Returns:
The sValueString
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLongLatAsString

void getLongLatAsString(double longitude,
                        double latitude,
                        int displayUnits,
                        String[] sLongitude,
                        String[] sLatitude,
                        String[] sUnits)
                        throws IOException,
                               AutomationException
Converts the specified degree coordinates and units to strings.

Description

Converts the specified x coordinate, y coordinate and unit of measure into three separate strings.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
longitude - The longitude (in)
latitude - The latitude (in)
displayUnits - A com.esri.arcgis.controls.esriARUnits constant (in)
sLongitude - The sLongitude (in/out: use single element array)
sLatitude - The sLatitude (in/out: use single element array)
sUnits - The sUnits (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esriUnitsAsAbbreviatedString

String esriUnitsAsAbbreviatedString(int units,
                                    int caseAppearance)
                                    throws IOException,
                                           AutomationException
Converts the specified units to a string abbreviation in upper or lower case.

Description

Converts the specified units to an abbreviated string.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
units - A com.esri.arcgis.controls.esriARUnits constant (in)
caseAppearance - A com.esri.arcgis.controls.esriARCaseAppearance constant (in)
Returns:
The sUnitString
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.