@Override public void mousePressed(MouseEvent arg0) { if (table.isEditing() && table.getCellEditor() == this) { isButtonColumnEditor = true; } }
@Override public void propertyChange(PropertyChangeEvent e) { // A cell has started/stopped editing if ("tableCellEditor".equals(e.getPropertyName())) { if (table.isEditing()) processEditingStarted(); else processEditingStopped(); } }
@Override public void mouseReleased(MouseEvent arg0) { if (isButtonColumnEditor && table.isEditing()) { table.getCellEditor().stopCellEditing(); } isButtonColumnEditor = false; }
if (propertyTable.isEditing() && (lastSelected != e.getPath() .getLastPathComponent()))
@Override public void mousePressed(MouseEvent e) { if(table.isEditing() && (this == table.getCellEditor())) { isButtonColumnEditor = true; } }
public void mouseReleased(MouseEvent e) { if (isButtonColumnEditor && table.isEditing()) table.getCellEditor().stopCellEditing(); isButtonColumnEditor = false; }
/** * Convenience method to stop editing a JTable. * * @param table The table. */ public static final void stopEditing(JTable table) { if (table.isEditing()) { table.getCellEditor().stopCellEditing(); } }
@Override public void mouseReleased(MouseEvent e) { if (isButtonColumnEditor && table.isEditing()) table.getCellEditor().stopCellEditing(); isButtonColumnEditor = false; } }
/** * Terminates. */ public void terminate() { if (paramtable.isEditing()) { paramtable.getCellEditor().stopCellEditing(); } }
public void tableChanged(TableModelEvent e) { if (table.isEditing() && e.getColumn() > 0) { table.editingCanceled(new ChangeEvent(getBasicObject())); } } };
private void cancelEdit() { if (editing) { editing= false; list.remove(editCell); centerPanel.repaint(); } else if (detailsTable != null && detailsTable.isEditing()) { detailsTable.getCellEditor().cancelCellEditing(); } }
public static void selectFirstCellOnFirstRowAndStopEditing(JTable table) { // select first cell doSelectCell(table, 0, 0); if (table.isEditing()) { // but no edit it table.getCellEditor().stopCellEditing(); } }
@Override public void actionPerformed(ActionEvent e) { if (table.isEditing()) { table.getCellEditor().stopCellEditing(); } else { ok = true; dispose(); } } }));
public static void selectFirstCellOnRow(JTable table, int row, boolean stopEdit) { // select first cell doSelectCell(table, row, 0); if (stopEdit && table.isEditing()) { table.getCellEditor().stopCellEditing(); } }
/** * Stop any editing that is currently being done on the table. This will * save any changes that have already been made. * * @param table the table to stop on editing */ public static void stopTableEditing(JTable table) { if (table.isEditing()) { TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn()); cellEditor.stopCellEditing(); } }
public static void commitChanges(JTable table) { if (table.isEditing()) { String text = ((JTextComponent) table.getEditorComponent()).getText(); table.setValueAt(text, table.getEditingRow(), table.getEditingColumn()); table.getCellEditor().cancelCellEditing(); } }
@Override public void modifyTestElement(TestElement te) { super.modifyTestElement(te); if (grid.isEditing()) { grid.getCellEditor().stopCellEditing(); } if (te instanceof CorrectedResultCollector) { CorrectedResultCollector rc = (CorrectedResultCollector) te; CollectionProperty rows = JMeterPluginsUtils.tableModelRowsToCollectionProperty(tableModel, REGEXPS_PROPERTY); rc.setProperty(rows); } }
public void sortByDefinedColumn(int col, int sortCol, boolean order) { CayenneTableModel model = (CayenneTableModel) table.getModel(); if (renderer.isSortingEnabled() && model.isColumnSortable(sortCol)) { renderer.setSelectedColumn(col, order); header.repaint(); if (table.isEditing()) { table.getCellEditor().stopCellEditing(); } model.sortByColumn(sortCol, order); } }
@Override public void modifyTestElement(TestElement te) { super.modifyTestElement(te); if (grid.isEditing()) { grid.getCellEditor().stopCellEditing(); } if (te instanceof MonitoringResultsCollector) { MonitoringResultsCollector mrc = (MonitoringResultsCollector) te; CollectionProperty rows = JMeterPluginsUtils.tableModelRowsToCollectionProperty(tableModel, MonitoringResultsCollector.DATA_PROPERTY); mrc.setData(rows); } super.configureTestElement(te); }