Binder for numeric fields. Constructs a {@see org.springframework.richclient.form.binding.swing.NumberBinding} which holdsa special inputfield {@see org.springframework.richclient.swing.BigDecimalTextField}.
This binder comes with a set of configuration properties which makes this easy reusable.
Examples:
<bean id="euroBinder" class="org.springframework.richclient.form.binding.swing.NumberBinder" lazy-init="true"> <property name="format"> <value>###,###,###,##0.00</value> </property> <property name="nrOfDecimals"> <value type="int">2</value> </property> <property name="leftDecoration"> <value>€</value> </property> </bean>
<bean id="percentageBinder" class="org.springframework.richclient.form.binding.swing.NumberBinder" lazy-init="true"> <property name="nrOfNonDecimals"> <value type="int">3</value> </property> <property name="nrOfDecimals"> <value type="int">4</value> </property> <property name="rightDecoration"> <value>%</value> </property> <property name="shiftFactor"> <value type="java.math.BigDecimal">100</value> </property> </bean>TODO it might be better to get the number of decimals/nonDecimals from the format @author jh
|
|