private void pushVariablesToEntity() { if (vc != null) { vc.clear(); } else { return; } for (int i = 0; i < model.getRowCount(); i++) { Object f = null; try { f = Float.parseFloat(model.getValueAt(i, 1).toString()); } catch (NumberFormatException exc) { f = model.getValueAt(i, 1).toString(); } vc.set(model.getValueAt(i, 0).toString(), f); } }
public void setVariableCase(final VariableCase vc) { clearAll(); for (Entry<String, Object> f : vc.getVariables()) { model.addRow(new Object[] {f.getKey(), f.getValue()}); } this.vc = vc; }