This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Allow to specify valueClass property of JFormattedTextField's formatter | ||
---|---|---|---|
Product: | guibuilder | Reporter: | babicka_baba |
Component: | Code | Assignee: | issues@guibuilder <issues> |
Status: | NEW --- | ||
Severity: | normal | Keywords: | PLAN |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
babicka_baba
2010-04-28 21:07:44 UTC
I am sorry, I am not sure that I understand what you request. Could you, please, elaborate on that? I can see one problem in our support that relates to BigDecimal values in JFormattedTextField. When you specify formatterFactory using our customizer and set BigDecimal value to your formattedTextField then getValue() method returns numbers of type Double (when the text of the textField is modified). This can be fixed by setting valueClass property of the corresponding formatter. For example: ((NumberFormatter)jFormattedTextField1.getFormatter()).setValueClass(BigDecimal.class); Is that what you are asking for? In other words, do you ask for the possibility to specify valueClass in the customizer of formatterFactory property? Yes, adding valueClass to the customizer would be one solution. My first idea was to add a only a bigdecimal preset - either as a special category distinct from "number", or to add a "Big decimal default" under the "integer default" in the formats in "number" category. |