protected void contactRelationship1_12(final JComponent component, final JComponent childComponent) {
//set initial value
if (ComponentManager.getValue(component) != null) {
CurrencyPlugin cp = CurrencyPlugin.getInstance();
UomPlugin up = UomPlugin.getInstance();
StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
int fraction = up.getFraction(ComponentManager.getValue(component).toString());
if (fraction > 0) {
sb.append(".");
}
for (int i = 1; i <= fraction; i++) {
sb.append("0");
}
DecimalFormat df = new DecimalFormat(sb.toString());
NumberFormatter nf = new NumberFormatter(df);
DefaultFormatterFactory factory = new DefaultFormatterFactory(nf);
((JFormattedTextField)childComponent).setFormatterFactory(factory);
}
((JComboBox)component).addActionListener(
new ActionAdapter() {
public void actionPerformed(ActionEvent e) {
if (ComponentManager.getValue(component) != null) {
CurrencyPlugin cp = CurrencyPlugin.getInstance();
UomPlugin up = UomPlugin.getInstance();
StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
int fraction = up.getFraction(ComponentManager.getValue(component).toString());
if (fraction > 0) {
sb.append(".");
}
for (int i = 1; i <= fraction; i++) {
sb.append("0");