# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- /home/mblaesing/src/netbeans-0.7-beta/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewTableUI.java +++ /home/mblaesing/src/netbeans-0.7-beta/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewTableUI.java.orig @@ -192,14 +192,21 @@ if (row == -1) { return; } + editCellAt(row, col); + TableCellEditor editor = getCellEditor(); + if (editor != null) { DBColumn dbcol = getDBColumn(col); if (dbcol.isGenerated() || !dbcol.isNullable()) { Toolkit.getDefaultToolkit().beep(); + editor.stopCellEditing(); } else { - setValueAt("", row, col); + editor.getTableCellEditorComponent(DataViewTableUI.this, null, rowSelectionAllowed, row, col); + setValueAt(null, row, col); + editor.stopCellEditing(); } setRowSelectionInterval(row, row); + } } else if (e.isControlDown() && e.getKeyChar() == KeyEvent.VK_1) { int row = getSelectedRow(); int col = getSelectedColumn(); @@ -207,18 +214,27 @@ return; } + editCellAt(row, col); + TableCellEditor editor = getCellEditor(); + if (editor != null) { DBColumn dbcol = getDBColumn(col); Object val = getValueAt(row, col); if (dbcol.isGenerated() || !dbcol.hasDefault()) { Toolkit.getDefaultToolkit().beep(); + editor.stopCellEditing(); } else if (val != null && val instanceof String && ((String) val).equals("")) { + editor.getTableCellEditorComponent(DataViewTableUI.this, "", rowSelectionAllowed, row, col); setValueAt(null, row, col); + editor.stopCellEditing(); } else { + editor.getTableCellEditorComponent(DataViewTableUI.this, "", rowSelectionAllowed, row, col); setValueAt("", row, col); + editor.stopCellEditing(); } setRowSelectionInterval(row, row); } } + } public void keyReleased(KeyEvent e) { }