public void actionPerformed(ActionEvent e) {
        int i;
        Object src = e.getSource();
        for (i = 0; i != einfocount; i++) {
            EditInfo ei = einfos[i];
            if (src == ei.textf) {
                if (ei.text == null) {
                    try {
                        double d = parseUnits(ei);
                        ei.value = d;
                    } catch (Exception ex) { /* ignored */ }
                }
                elm.setEditValue(i, ei);
                if (ei.text == null) {
                    setBar(ei);
                }
                cframe.needAnalyze();
            }
        }
        if (e.getSource() == okButton) {
            apply();
            closeDialog();
        }
        if (e.getSource() == applyButton) {
            apply();
        }
    }