|
From: Benoit X. (JIRA) <no...@sp...> - 2008-04-07 16:37:06
|
Adding shortcuts to BigDecimalTextField
---------------------------------------
Key: RCP-553
URL: http://jira.springframework.org/browse/RCP-553
Project: Spring Framework Rich Client Project
Issue Type: Improvement
Components: Helper Classes
Affects Versions: 1.0.0
Reporter: Benoit Xhenseval
We would like to be able to add shortcuts, like "3m" meaning 3 millions, 2k = 2,000. Typically a shortcut for hundred, thousand, millions, billions (for SocGen J ).
Unfortunately, BigDecimalTextField is explicitly instantiated in several places, making it impossible to extend.
We have a patch that works fine for us and it should work internationally as the shortcut may vary from one language to the other.
One needs to add the shortcut characters in a messages.properties file:
BigDecimalTextField.shortcut.hundred=h
BigDecimalTextField.shortcut.thousand=k
BigDecimalTextField.shortcut.million=m
BigDecimalTextField.shortcut.billion=b
...
So if you type 3k in the field, it will immediately be replaced by 3000.
If you do not have those entries in the messages.properties, it won't use shortcuts so it is transparent if you do not want it.
I hope that the patch will be accepted so that we can use SpringRC straight out of the box...
Many thanks
Benoit
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|