| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.arcgis.system.CurrencyFormat
public class CurrencyFormat
An object for formatting numbers in a currency format.
CurrencyFormat is a coclass that formats numbers to look like a currency. For example, the number 123456.789 when formatted with CurrencyFormat (default U.S. English regional settings) would look like $123,456.79. Note that the formatted number is rounded to the nearest cent. Negative numbers are typically depicted inside parentheses, e.g., a negative number of the same value would be formatted as ($123,456.79).
To format numbers as currency, create a CurrencyFormat object and use the ValueToString method.
CurrencyFormat does not have an ICurrencyFormat interface because there are no member properties to set. To use it, define an object as an INumberFormat and set it to a New CurrencyFormat. You can access the ValueToString and StringToValue methods directly from this object.
Numbers are formatted using the current regional settings defined for the system at runtime. To change the way currency numbers are formatted, change the settings on the Currency tab of Control Panel's Regional Settings applet.
ILatLonFormat2, 
CustomNumberFormat, 
IRateFormat, 
IAngleFormat, 
NumericFormat, 
LatLonFormat, 
CurrencyFormat, 
INumericFormat, 
IFractionFormat, 
RateFormat, 
IScientificNumberFormat, 
ICustomNumberFormat, 
ILatLonFormat, 
IPercentageFormat, 
INumberFormat, 
ScientificFormat, 
FractionFormat, 
PercentageFormat, 
AngleFormat, 
Serialized Form| Constructor Summary | |
|---|---|
| CurrencyFormat()Constructs a CurrencyFormat using ArcGIS Engine. | |
| CurrencyFormat(Object obj)Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.  CurrencyFormat theCurrencyFormat = (CurrencyFormat) 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. | 
|  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 | 
|  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 | 
|---|
public CurrencyFormat()
               throws IOException,
                      UnknownHostException
IOException - if there are interop problems
UnknownHostException - if there are interop problems
public CurrencyFormat(Object obj)
               throws IOException
 CurrencyFormat theCurrencyFormat = (CurrencyFormat) obj;
obj to CurrencyFormat.
obj - an object returned from ArcGIS Engine or Server
IOException - if there are interop problems| Method Detail | 
|---|
public static String getClsid()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
public String valueToString(double value)
                     throws IOException,
                            AutomationException
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.
valueToString in interface INumberFormatvalue - The value  (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.ILatLonFormat2, 
CustomNumberFormat, 
IRateFormat, 
IAngleFormat, 
NumericFormat, 
LatLonFormat, 
CurrencyFormat, 
INumericFormat, 
IFractionFormat, 
RateFormat, 
IScientificNumberFormat, 
ICustomNumberFormat, 
ILatLonFormat, 
IPercentageFormat, 
INumberFormat, 
ScientificFormat, 
FractionFormat, 
PercentageFormat, 
AngleFormat
public double stringToValue(String str)
                     throws IOException,
                            AutomationException
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.
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).
stringToValue in interface INumberFormatstr - The str  (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.ILatLonFormat2, 
CustomNumberFormat, 
IRateFormat, 
IAngleFormat, 
NumericFormat, 
LatLonFormat, 
CurrencyFormat, 
INumericFormat, 
IFractionFormat, 
RateFormat, 
IScientificNumberFormat, 
ICustomNumberFormat, 
ILatLonFormat, 
IPercentageFormat, 
INumberFormat, 
ScientificFormat, 
FractionFormat, 
PercentageFormat, 
AngleFormat
public double increment(double value)
                 throws IOException,
                        AutomationException
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.
increment in interface INumberFormatOperationsvalue - The value  (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IClone esri_clone()
                  throws IOException,
                         AutomationException
esri_clone in interface ICloneIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void assign(IClone src)
            throws IOException,
                   AutomationException
assign in interface IClonesrc - A reference to a com.esri.arcgis.system.IClone  (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public boolean isEqual(IClone other)
                throws IOException,
                       AutomationException
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.
isEqual in interface ICloneother - A reference to a com.esri.arcgis.system.IClone  (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public boolean isIdentical(IClone other)
                    throws IOException,
                           AutomationException
IsIdentical returns true if the receiver and the source reference the same object.
isIdentical in interface ICloneother - A reference to a com.esri.arcgis.system.IClone  (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.
getClassID in interface IPersistpClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID  (out: use single element array)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void isDirty()
             throws IOException,
                    AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
isDirty in interface IPersistStreamIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void load(IStream pstm)
          throws IOException,
                 AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
load in interface IPersistStreampstm - A reference to a com.esri.arcgis.system.IStream  (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
save in interface IPersistStreampstm - A reference to a com.esri.arcgis.system.IStream  (in)fClearDirty - The fClearDirty  (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
getSizeMax in interface IPersistStreampcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER  (out: use single element array)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void writeExternal(ObjectOutput out)
                   throws IOException
writeExternal in interface ExternalizableIOException
public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||