CurrencyFormatter.hx 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package flash.globalization;
  2. @:require(flash10_1) extern final class CurrencyFormatter {
  3. @:flash.property var actualLocaleIDName(get,never) : String;
  4. @:flash.property var currencyISOCode(get,never) : String;
  5. @:flash.property var currencySymbol(get,never) : String;
  6. @:flash.property var decimalSeparator(get,set) : String;
  7. @:flash.property var digitsType(get,set) : UInt;
  8. @:flash.property var fractionalDigits(get,set) : Int;
  9. @:flash.property var groupingPattern(get,set) : String;
  10. @:flash.property var groupingSeparator(get,set) : String;
  11. @:flash.property var lastOperationStatus(get,never) : LastOperationStatus;
  12. @:flash.property var leadingZero(get,set) : Bool;
  13. @:flash.property var negativeCurrencyFormat(get,set) : UInt;
  14. @:flash.property var negativeSymbol(get,set) : String;
  15. @:flash.property var positiveCurrencyFormat(get,set) : UInt;
  16. @:flash.property var requestedLocaleIDName(get,never) : String;
  17. @:flash.property var trailingZeros(get,set) : Bool;
  18. @:flash.property var useGrouping(get,set) : Bool;
  19. function new(requestedLocaleIDName : String) : Void;
  20. function format(value : Float, withCurrencySymbol : Bool = false) : String;
  21. function formattingWithCurrencySymbolIsSafe(requestedISOCode : String) : Bool;
  22. private function get_actualLocaleIDName() : String;
  23. private function get_currencyISOCode() : String;
  24. private function get_currencySymbol() : String;
  25. private function get_decimalSeparator() : String;
  26. private function get_digitsType() : UInt;
  27. private function get_fractionalDigits() : Int;
  28. private function get_groupingPattern() : String;
  29. private function get_groupingSeparator() : String;
  30. private function get_lastOperationStatus() : LastOperationStatus;
  31. private function get_leadingZero() : Bool;
  32. private function get_negativeCurrencyFormat() : UInt;
  33. private function get_negativeSymbol() : String;
  34. private function get_positiveCurrencyFormat() : UInt;
  35. private function get_requestedLocaleIDName() : String;
  36. private function get_trailingZeros() : Bool;
  37. private function get_useGrouping() : Bool;
  38. function parse(inputString : String) : CurrencyParseResult;
  39. function setCurrency(currencyISOCode : String, currencySymbol : String) : Void;
  40. private function set_decimalSeparator(value : String) : String;
  41. private function set_digitsType(value : UInt) : UInt;
  42. private function set_fractionalDigits(value : Int) : Int;
  43. private function set_groupingPattern(value : String) : String;
  44. private function set_groupingSeparator(value : String) : String;
  45. private function set_leadingZero(value : Bool) : Bool;
  46. private function set_negativeCurrencyFormat(value : UInt) : UInt;
  47. private function set_negativeSymbol(value : String) : String;
  48. private function set_positiveCurrencyFormat(value : UInt) : UInt;
  49. private function set_trailingZeros(value : Bool) : Bool;
  50. private function set_useGrouping(value : Bool) : Bool;
  51. static function getAvailableLocaleIDNames() : flash.Vector<String>;
  52. }