com.esri.arcgis.system
Class DirectionFormat

java.lang.Object
  extended by com.esri.arcgis.system.DirectionFormat
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IClone, IDirectionFormat, INumberFormat, INumberFormatOperations, IPersist, IPersistStream, Externalizable, Serializable

public class DirectionFormat
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, INumberFormat, INumberFormatOperations, IDirectionFormat, IClone, IPersist, IPersistStream, Externalizable

An object for formatting numbers in a direction format.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
DirectionFormat()
          Constructs a DirectionFormat using ArcGIS Engine.
DirectionFormat(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
DirectionFormat theDirectionFormat = (DirectionFormat) obj;
 
Method Summary
 void assign(IClone src)
          Assigns the properties of src to the receiver.
 boolean equals(Object o)
          Compare this object with another
 IClone esri_clone()
          Clones the receiver and assigns the result to *clone.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 int getDecimalPlaces()
          The number of decimal digits in a seconds part of the formatted number.
 int getDirectionType()
          Indicates the direction of the argument in ValueToString.
 int getDirectionUnits()
          Indicates Direction Unit for the ValueToString argument.
 int getDisplayFormat()
          Indicates how to display the direction value.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 int hashCode()
          the hashcode for this object
 double increment(double value)
          Increments a value according to the numbers format.
 void isDirty()
          isDirty
 boolean isEqual(IClone other)
          Indicates if the receiver and other have the same properties.
 boolean isIdentical(IClone other)
          Indicates if the receiver and other are the same object.
 void load(IStream pstm)
          load
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 void setDecimalPlaces(int num)
          The number of decimal digits in a seconds part of the formatted number.
 void setDirectionType(int direction)
          Indicates the direction of the argument in ValueToString.
 void setDirectionUnits(int unit)
          Indicates Direction Unit for the ValueToString argument.
 void setDisplayFormat(int directionFormat)
          Indicates how to display the direction value.
 double stringToValue(String str)
          Converts a formatted string to a numeric value.
 String valueToString(double value)
          Converts a numeric value to a formatted string.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

DirectionFormat

public DirectionFormat()
                throws IOException,
                       UnknownHostException
Constructs a DirectionFormat using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

DirectionFormat

public DirectionFormat(Object obj)
                throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
DirectionFormat theDirectionFormat = (DirectionFormat) obj;

Construct a DirectionFormat using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to DirectionFormat.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

valueToString

public String valueToString(double value)
                     throws IOException,
                            AutomationException
Converts a numeric value to a formatted string.

Description

The ValueToString method expresses a numeric value as a formatted string. The string is formatted based on the property settings of the number formatting interface that is used. See the particular number formatting interface you're interested in under See Also above for more information.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
valueToString in interface INumberFormat
Parameters:
value - The value (in)
Returns:
The str
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ILatLonFormat2, CustomNumberFormat, IRateFormat, IAngleFormat, NumericFormat, LatLonFormat, CurrencyFormat, INumericFormat, IFractionFormat, RateFormat, IScientificNumberFormat, ICustomNumberFormat, ILatLonFormat, IPercentageFormat, INumberFormat, ScientificFormat, FractionFormat, PercentageFormat, AngleFormat

stringToValue

public double stringToValue(String str)
                     throws IOException,
                            AutomationException
Converts a formatted string to a numeric value.

Description

The StringToValue method obtains a numerical value from a formatted string. The string doesn't necessarily need to have been formatted with the ValueToString method, but the string needs to look like it would be if it was formatted with the associated interface's implementation of the ValueToString method. See the particular number formatting interface you're interested in under See Also above for more information.

Remarks

When using the StringToValue method to obtain a ValueToString argument value, the properties in the associated interface must be set the same as they were when the ValueToString method was used. This applies in cases where ValueToString may perform a numerical conversion (in the IAngleFormat, IFractionFormat, IPercentageFormat, and IRateFormat interfaces).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
stringToValue in interface INumberFormat
Parameters:
str - The str (in)
Returns:
The value
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ILatLonFormat2, CustomNumberFormat, IRateFormat, IAngleFormat, NumericFormat, LatLonFormat, CurrencyFormat, INumericFormat, IFractionFormat, RateFormat, IScientificNumberFormat, ICustomNumberFormat, ILatLonFormat, IPercentageFormat, INumberFormat, ScientificFormat, FractionFormat, PercentageFormat, AngleFormat

increment

public double increment(double value)
                 throws IOException,
                        AutomationException
Increments a value according to the numbers format.

Remarks

The Increment method reacts differently depending on the number format object used and how that object is configured. A NumericFormat configured for a specific number of decimal places will increment to the last decimal place. For example, if two decimal places are specified, 22.533 would increment to 22.54; if the object is configured for two significant digits, 22.533 would increment to 24. For an AngleFormat, the input value is converted to the display format first then the same rules apply as for a NumericFormat.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
increment in interface INumberFormatOperations
Parameters:
value - The value (in)
Returns:
The result
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDirectionUnits

public void setDirectionUnits(int unit)
                       throws IOException,
                              AutomationException
Indicates Direction Unit for the ValueToString argument.

Product Availability

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

Specified by:
setDirectionUnits in interface IDirectionFormat
Parameters:
unit - A com.esri.arcgis.system.esriDirectionUnits constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDirectionUnits

public int getDirectionUnits()
                      throws IOException,
                             AutomationException
Indicates Direction Unit for the ValueToString argument.

Product Availability

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

Specified by:
getDirectionUnits in interface IDirectionFormat
Returns:
A com.esri.arcgis.system.esriDirectionUnits constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDirectionType

public void setDirectionType(int direction)
                      throws IOException,
                             AutomationException
Indicates the direction of the argument in ValueToString.

Product Availability

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

Specified by:
setDirectionType in interface IDirectionFormat
Parameters:
direction - A com.esri.arcgis.system.esriDirectionType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDirectionType

public int getDirectionType()
                     throws IOException,
                            AutomationException
Indicates the direction of the argument in ValueToString.

Product Availability

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

Specified by:
getDirectionType in interface IDirectionFormat
Returns:
A com.esri.arcgis.system.esriDirectionType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDisplayFormat

public void setDisplayFormat(int directionFormat)
                      throws IOException,
                             AutomationException
Indicates how to display the direction value.

Product Availability

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

Specified by:
setDisplayFormat in interface IDirectionFormat
Parameters:
directionFormat - A com.esri.arcgis.system.esriDirectionFormatEnum constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDisplayFormat

public int getDisplayFormat()
                     throws IOException,
                            AutomationException
Indicates how to display the direction value.

Product Availability

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

Specified by:
getDisplayFormat in interface IDirectionFormat
Returns:
A com.esri.arcgis.system.esriDirectionFormatEnum constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDecimalPlaces

public void setDecimalPlaces(int num)
                      throws IOException,
                             AutomationException
The number of decimal digits in a seconds part of the formatted number.

Product Availability

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

Specified by:
setDecimalPlaces in interface IDirectionFormat
Parameters:
num - The num (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDecimalPlaces

public int getDecimalPlaces()
                     throws IOException,
                            AutomationException
The number of decimal digits in a seconds part of the formatted number.

Product Availability

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

Specified by:
getDecimalPlaces in interface IDirectionFormat
Returns:
The num
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_clone

public IClone esri_clone()
                  throws IOException,
                         AutomationException
Clones the receiver and assigns the result to *clone.

Product Availability

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

Specified by:
esri_clone in interface IClone
Returns:
A reference to a com.esri.arcgis.system.IClone
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

assign

public void assign(IClone src)
            throws IOException,
                   AutomationException
Assigns the properties of src to the receiver.

Description

Use Assign method to assign the properties of source object to receiver object. Both objects need to have the same CLSIDs. Both source and receiver objects need to be instantiated.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
assign in interface IClone
Parameters:
src - A reference to a com.esri.arcgis.system.IClone (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEqual

public boolean isEqual(IClone other)
                throws IOException,
                       AutomationException
Indicates if the receiver and other have the same properties.

Description

IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isEqual in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The equal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isIdentical

public boolean isIdentical(IClone other)
                    throws IOException,
                           AutomationException
Indicates if the receiver and other are the same object.

Description

IsIdentical returns true if the receiver and the source reference the same object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isIdentical in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The identical
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirty in interface IPersistStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException