public void setEditValue(int n, EditInfo ei) {
        if (n == 0) {
            inductance = ei.value;
        }
        if (n == 1) {
            ratio = ei.value;
        }
        if (n == 2 && ei.value > 0 && ei.value < 1) {
            couplingCoef = ei.value;
        }
        if (n == 3) {
            if (ei.checkbox.getState()) {
                flags &= ~Inductor.FLAG_BACK_EULER;
            } else {
                flags |= Inductor.FLAG_BACK_EULER;
            }
        }
    }