By default, Spring RCP will use a simple text binder for Numbers. However, there's a NumberBinder you can use. By default, it's enabled for BigDecimals, but you can specify the specific Number type. With that binder you can:
- specify the format
- specify the number of decimals
- set left or right decoration (currency sign for example)
- enable/disable negative numbers
for example:
Code:
<bean id="euroBinder" class="org.springframework.richclient.form.binding.swing.NumberBinder" lazy-init="true">
<property name="format" value="###,###,###,##0.00"/>
<property name="nrOfDecimals" value="2"/>
<property name="leftDecoration" value="€"/>
</bean>
You can then use that binder in the formbuilders, or set it as the default for a type through the SwingBinderSelectionStrategy.