/** * Stop any editing that is currently being done on the table. This will * save any changes that have already been made. * Needed for subclasses */ protected void stopTableEditing() { GuiUtils.stopTableEditing(table); }
/** * Stop any editing that is currently being done on the table. This will * save any changes that have already been made. */ protected void stopTableEditing() { GuiUtils.stopTableEditing(table); }
/** * Stop any editing that is currently being done on the table. This will * save any changes that have already been made. */ protected void stopTableEditing() { GuiUtils.stopTableEditing(table); }
/** * Clear all rows from the table. */ public void clear() { GuiUtils.stopTableEditing(table); tableModel.clearData(); }
/** * Clear all rows from the table. T.Elanjchezhiyan(chezhiyan@siptech.co.in) */ public void clear() { GuiUtils.stopTableEditing(table); tableModel.clearData(); }
@Override public void actionPerformed(ActionEvent e) { int[] rowsSelected = paramTable.getSelectedRows(); GuiUtils.stopTableEditing(paramTable); if (rowsSelected.length > 0 && rowsSelected[0] > 0) { for (int rowSelected : rowsSelected) { tableModel.moveRow(rowSelected, rowSelected + 1, rowSelected - 1); } for (int rowSelected : rowsSelected) { paramTable.addRowSelectionInterval(rowSelected - 1, rowSelected - 1); } } } }
@Override public void actionPerformed(ActionEvent e) { int[] rowsSelected = paramTable.getSelectedRows(); GuiUtils.stopTableEditing(paramTable); if (rowsSelected.length > 0 && rowsSelected[rowsSelected.length - 1] < paramTable.getRowCount() - 1) { for (int i = rowsSelected.length - 1; i >= 0; i--) { int rowSelected = rowsSelected[i]; tableModel.moveRow(rowSelected, rowSelected + 1, rowSelected + 1); } for (int rowSelected : rowsSelected) { paramTable.addRowSelectionInterval(rowSelected + 1, rowSelected + 1); } } } }
/** * Show Row Detail */ private void showDetail() { //get the selected rows before stopping editing // or the selected will be unselected int[] rowsSelected = table.getSelectedRows(); GuiUtils.stopTableEditing(table); if (rowsSelected.length == 1) { table.clearSelection(); RowDetailDialog detailDialog = new RowDetailDialog(tableModel, rowsSelected[0]); detailDialog.setVisible(true); } }
@Override public void actionPerformed(ActionEvent e) { GuiUtils.stopTableEditing(stringTable); tableModel.addNewRow(); checkButtonsStatus(); tableModel.fireTableDataChanged(); } }
/** * Modifies a given TestElement to mirror the data in the gui components. * * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement) */ @Override public void modifyTestElement(TestElement el) { GuiUtils.stopTableEditing(headerTable); el.clear(); el.addTestElement(headerManager); configureTestElement(el); }
@Override public void actionPerformed(ActionEvent e) { GuiUtils.stopTableEditing(paramTable); tableModel.addNewRow(); tableModel.fireTableDataChanged(); // Enable DELETE (which may already be enabled, but it won't hurt) deleteRowButton.setEnabled(true); // Highlight (select) the appropriate row. int rowToSelect = tableModel.getRowCount() - 1; paramTable.setRowSelectionInterval(rowToSelect, rowToSelect); } }
/** * Modifies a given TestElement to mirror the data in the gui components. * * @param el * the test element to modify * * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement) */ public void modifyTestElement(TestElement el) { GuiUtils.stopTableEditing(jmsPropertiesTable); JMSProperties jmsProperties = (JMSProperties) el; jmsProperties.clear(); jmsProperties.addTestElement((TestElement) tableModel.jmsProperties.clone()); }
private void addTableRow(JTable table, PowerTableModel model, JButton button) { // 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); model.addNewRow(); model.fireTableDataChanged(); if (!button.isEnabled()) { button.setEnabled(true); } // Highlight (select) the appropriate row. int rowToSelect = model.getRowCount() - 1; table.setRowSelectionInterval(rowToSelect, rowToSelect); }
/** * Add a new argument row to the table. */ private 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(makeNewLDAPArgument()); // Enable DELETE (which may already be enabled, but it won't hurt) delete.setEnabled(true); // Highlight (select) the appropriate row. int rowToSelect = tableModel.getRowCount() - 1; table.setRowSelectionInterval(rowToSelect, rowToSelect); }
/** * 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.addNewRow(); tableModel.fireTableDataChanged(); // Enable DELETE (which may already be enabled, but it won't hurt) delete.setEnabled(true); // Highlight (select) the appropriate row. int rowToSelect = tableModel.getRowCount() - 1; table.setRowSelectionInterval(rowToSelect, rowToSelect); }
@Override public void actionPerformed(ActionEvent e) { GuiUtils.stopTableEditing(paramTable); tableModel.addNewColumn(getUserColName(tableModel.getColumnCount()), String.class); tableModel.fireTableDataChanged(); setColumnWidths(); // Enable DELETE (which may already be enabled, but it won't hurt) deleteColumnButton.setEnabled(true); // Highlight (select) the appropriate row. int colToSelect = tableModel.getColumnCount() - 1; paramTable.setColumnSelectionInterval(colToSelect, colToSelect); } }
/** * Modifies a given TestElement to mirror the data in the gui components. * * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement) */ @Override public void modifyTestElement(TestElement el) { GuiUtils.stopTableEditing(authTable); AuthManager authManager = (AuthManager) el; authManager.clear(); authManager.addTestElement((TestElement) tableModel.manager.clone()); authManager.setClearEachIteration(clearEachIteration.isSelected()); configureTestElement(el); }
/** * Add a new file row to the table. */ private void addFile(String path) { // 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(new HTTPFileArg(path)); checkDeleteAndBrowseStatus(); // Highlight (select) the appropriate row. int rowToSelect = tableModel.getRowCount() - 1; table.setRowSelectionInterval(rowToSelect, rowToSelect); }
/** * 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)); }
/** * Get all of the values from the GUI component and set them in the * TestElement. * * @param el * the TestElement to modify */ @Override public void modifyTestElement(TestElement el) { GuiUtils.stopTableEditing(table); Data model = tableModel.getData(); model.reset(); while (model.next()) { el.setProperty(new StringProperty((String) model.getColumnValue(COLUMN_NAMES_0), (String) model .getColumnValue(COLUMN_NAMES_1))); } super.configureTestElement(el); }