/** Invoked when an action occurs. */ public void actionPerformed(final ActionEvent e) { final TableCellEditor tableCellEditor = parameterMappingTable.getCellEditor(); if (tableCellEditor != null) { tableCellEditor.stopCellEditing(); } final ParameterMappingTableModel tableModel = (ParameterMappingTableModel) parameterMappingTable.getModel(); tableModel.addRow(); }
/** Invoked when an action occurs. */ public void actionPerformed(final ActionEvent e) { final TableCellEditor tableCellEditor = parameterMappingTable.getCellEditor(); if (tableCellEditor != null) { tableCellEditor.stopCellEditing(); } final int i = parameterMappingTable.getSelectedRow(); if (i == -1) { return; } final ParameterMappingTableModel tableModel = (ParameterMappingTableModel) parameterMappingTable.getModel(); tableModel.removeRow(i); }
public EditResult performEdit( final ParameterMapping[] parameterMappings, final String[] reportFields, final String[] declaredParameter) { innerTableCellEditor.setTags(reportFields); outerTableCellEditor.setTags(declaredParameter); final ParameterMappingTableModel parameterMappingTableModel = (ParameterMappingTableModel) parameterMappingTable.getModel(); parameterMappingTableModel.setMappings(parameterMappings); if (super.performEdit() == false) { return null; } final TableCellEditor cellEditor = parameterMappingTable.getCellEditor(); if (cellEditor != null) { cellEditor.stopCellEditing(); } return new EditResult(parameterMappingTableModel.getMappings()); }