Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » FormattedText Currency
FormattedText Currency [message #48605] Mon, 04 February 2008 22:57 Go to next message
Grant Slender is currently offline Grant SlenderFriend
Messages: 36
Registered: July 2009
Member
Hi,

What would be the best way to configure the FormattedText for currency
and to ensure locale is obeyed?

eg... $50,000.00

or a pattern like $###,##0.00 (but this is only correct for my locale)

Looking at the API I could not simply see how to enable locale specifc
currency patterns... the Swing NumberFormatter has a
getCurrencyInstance() method that does this for Swing.

Anything similar?

Cheers,
Grant
Re: FormattedText Currency [message #49132 is a reply to message #48605] Wed, 06 February 2008 22:13 Go to previous messageGo to next message
Eric Wuillai is currently offline Eric WuillaiFriend
Messages: 27
Registered: July 2009
Junior Member
The currency symbol is not actually recognized in NumberFormatter.
But I have in plan a CurrencyFormatter on which I already made some
investigations about the implementation.
You can however add a currency symbol to a NumberFormatter by adding a
prefix or suffix.

Eric

Grant Slender a écrit :
> Hi,
>
> What would be the best way to configure the FormattedText for currency
> and to ensure locale is obeyed?
>
> eg... $50,000.00
>
> or a pattern like $###,##0.00 (but this is only correct for my locale)
>
> Looking at the API I could not simply see how to enable locale specifc
> currency patterns... the Swing NumberFormatter has a
> getCurrencyInstance() method that does this for Swing.
>
> Anything similar?
>
> Cheers,
> Grant
Re: FormattedText Currency [message #49159 is a reply to message #49132] Thu, 07 February 2008 20:43 Go to previous message
Grant Slender is currently offline Grant SlenderFriend
Messages: 36
Registered: July 2009
Member
Eric,

How would I set a prefix/suffix to NumberFormatter - the methods are
marked protected??? I guess I could extend NumberFormatter, but seems
like a complicated way to just set prefix/suffix ???

Cheers,
Grant



Eric Wuillai wrote:
> The currency symbol is not actually recognized in NumberFormatter.
> But I have in plan a CurrencyFormatter on which I already made some
> investigations about the implementation.
> You can however add a currency symbol to a NumberFormatter by adding a
> prefix or suffix.
>
> Eric
>
> Grant Slender a écrit :
>> Hi,
>>
>> What would be the best way to configure the FormattedText for currency
>> and to ensure locale is obeyed?
>>
>> eg... $50,000.00
>>
>> or a pattern like $###,##0.00 (but this is only correct for my locale)
>>
>> Looking at the API I could not simply see how to enable locale specifc
>> currency patterns... the Swing NumberFormatter has a
>> getCurrencyInstance() method that does this for Swing.
>>
>> Anything similar?
>>
>> Cheers,
>> Grant
Re: FormattedText Currency [message #588513 is a reply to message #48605] Wed, 06 February 2008 22:13 Go to previous message
Eric Wuillai is currently offline Eric WuillaiFriend
Messages: 27
Registered: July 2009
Junior Member
The currency symbol is not actually recognized in NumberFormatter.
But I have in plan a CurrencyFormatter on which I already made some
investigations about the implementation.
You can however add a currency symbol to a NumberFormatter by adding a
prefix or suffix.

Eric

Grant Slender a écrit :
> Hi,
>
> What would be the best way to configure the FormattedText for currency
> and to ensure locale is obeyed?
>
> eg... $50,000.00
>
> or a pattern like $###,##0.00 (but this is only correct for my locale)
>
> Looking at the API I could not simply see how to enable locale specifc
> currency patterns... the Swing NumberFormatter has a
> getCurrencyInstance() method that does this for Swing.
>
> Anything similar?
>
> Cheers,
> Grant
Re: FormattedText Currency [message #588520 is a reply to message #49132] Thu, 07 February 2008 20:43 Go to previous message
Grant Slender is currently offline Grant SlenderFriend
Messages: 36
Registered: July 2009
Member
Eric,

How would I set a prefix/suffix to NumberFormatter - the methods are
marked protected??? I guess I could extend NumberFormatter, but seems
like a complicated way to just set prefix/suffix ???

Cheers,
Grant



Eric Wuillai wrote:
> The currency symbol is not actually recognized in NumberFormatter.
> But I have in plan a CurrencyFormatter on which I already made some
> investigations about the implementation.
> You can however add a currency symbol to a NumberFormatter by adding a
> prefix or suffix.
>
> Eric
>
> Grant Slender a écrit :
>> Hi,
>>
>> What would be the best way to configure the FormattedText for currency
>> and to ensure locale is obeyed?
>>
>> eg... $50,000.00
>>
>> or a pattern like $###,##0.00 (but this is only correct for my locale)
>>
>> Looking at the API I could not simply see how to enable locale specifc
>> currency patterns... the Swing NumberFormatter has a
>> getCurrencyInstance() method that does this for Swing.
>>
>> Anything similar?
>>
>> Cheers,
>> Grant
Previous Topic:Restricting the selection of entire row in grid
Next Topic:[grid] Menu popup in void
Goto Forum:
  


Current Time: Tue Apr 16 20:34:03 GMT 2024

Powered by FUDForum. Page generated in 1.18861 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top