IDEA-139647 Change signature: focus is lost while typing parameter name/value

This commit is contained in:
Sergey Malenkov
2016-04-22 20:45:47 +03:00
parent dd93b4ba45
commit 84f06cf5c6
2 changed files with 15 additions and 8 deletions
@@ -64,13 +64,7 @@ public abstract class ParameterTableModelBase<P extends ParameterInfo, TableItem
}
public void setValueAtWithoutUpdate(Object aValue, int rowIndex, int columnIndex) {
super.setValueAt(aValue, rowIndex, columnIndex);
}
@Override
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
super.setValueAt(aValue, rowIndex, columnIndex);
fireTableCellUpdated(rowIndex, columnIndex); // to update signature
setValueAt(aValue, rowIndex, columnIndex, false);
}
protected static abstract class ColumnInfoBase<P extends ParameterInfo, TableItem extends ParameterTableModelItemBase<P>, Aspect>
@@ -113,10 +113,23 @@ public class ListTableModel<Item> extends TableViewModel<Item> implements Editab
@Override
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
setValueAt(aValue, rowIndex, columnIndex, true);
}
/**
* Sets the value in the cell at {@code columnIndex} and {@code rowIndex} to {@code aValue}.
* This method allows to choose will the model listeners notified or not.
*
* @param aValue the new value
* @param rowIndex the row whose value is to be changed
* @param columnIndex the column whose value is to be changed
* @param notifyListeners indicates whether the model listeners are notified
*/
public void setValueAt(Object aValue, int rowIndex, int columnIndex, boolean notifyListeners) {
if (rowIndex < myItems.size()) {
myColumnInfos[columnIndex].setValue(getItem(rowIndex), aValue);
}
fireTableCellUpdated(rowIndex, columnIndex);
if (notifyListeners) fireTableCellUpdated(rowIndex, columnIndex);
}
/**