/** * Saves the value of the currently active cell editor, by delegating to * the cell modifier. */ private void saveEditorValue(CellEditor cellEditor, Item tableItem) { if( cellModifier != null ) { if( ! cellEditor.isValueValid() ) { // Do what???? } } String property = null; if( columnProperties != null && columnNumber < columnProperties.length ) { property = columnProperties[columnNumber]; } cellModifier.modify(tableItem, property, cellEditor.getValue()); }
/** * Saves the value of the currently active cell editor, by delegating to the * cell modifier. */ private void saveEditorValue(CellEditor cellEditor, Item tableItem) { if (fCellModifier != null) { if (!cellEditor.isValueValid()) { // /Do what ??? } String property = null; if (fColumnProperties != null && fColumnNumber < fColumnProperties.length) property = fColumnProperties[fColumnNumber]; fCellModifier.modify(tableItem, property, cellEditor.getValue()); } }
public void applyEditorValue() { if (editor == null) { return; } // Check if editor has a valid value if (!editor.isValueValid()) { setErrorText(editor.getErrorMessage()); return; } setErrorText(null); // See if the value changed and if so update Object newValue = editor.getValue(); boolean changed = false; if (values.length > 1) { changed = true; } else if (editValue == null) { if (newValue != null) { changed = true; } } else if (!editValue.equals(newValue)) { changed = true; } // Set the editor value if (changed) { setValue(newValue); } }
@Override public void applyEditorValue() { if (editor == null) { return; } // Check if editor has a valid value if (!editor.isValueValid()) { setErrorText(editor.getErrorMessage()); return; } setErrorText(null); // See if the value changed and if so update Object newValue = editor.getValue(); boolean changed = false; if (values.length > 1) { changed = true; } else if (editValue == null) { if (newValue != null) { changed = true; } } else if (!editValue.equals(newValue)) { changed = true; } // Set the editor value if (changed) { setValue(newValue); } }
@Override public void applyEditorValue() { if (editor == null) { return; } // Check if editor has a valid value if (!editor.isValueValid()) { setErrorText(editor.getErrorMessage()); return; } setErrorText(null); // See if the value changed and if so update Object newValue = editor.getValue(); boolean changed = false; if (values.length > 1) { changed = true; } else if (editValue == null) { if (newValue != null) { changed = true; } } else if (!editValue.equals(newValue)) { changed = true; } // Set the editor value if (changed) { setValue(newValue); } }
if (t != null && !t.isDisposed() && c.isValueValid()) { saveEditorValue(c);
if (t != null && !t.isDisposed() && c.isValueValid()) { saveEditorValue(c);