protected Argument createArgumentFromClipboard(String[] clipboardCols) { Argument argument = makeNewArgument(); argument.setName(clipboardCols[0]); if (clipboardCols.length > 1) { argument.setValue(clipboardCols[1]); if (clipboardCols.length > 2) { argument.setDescription(clipboardCols[2]); } } return argument; }
/** * Add a new argument row to the table. */ protected void addArgument() { // If a table cell is being edited, we should accept the current value // and stop the editing before adding a new row. GuiUtils.stopTableEditing(table); tableModel.addRow(makeNewArgument()); checkButtonsStatus(); // Highlight (select) and scroll to the appropriate row. int rowToSelect = tableModel.getRowCount() - 1; table.setRowSelectionInterval(rowToSelect, rowToSelect); table.scrollRectToVisible(table.getCellRect(rowToSelect, 0, true)); }