/** * Processes a modify event that occurred in this text cell editor. * This framework method performs validation and sets the error message * accordingly, and then reports a change via <code>fireEditorValueChanged</code>. * Subclasses should call this method at appropriate times. Subclasses * may extend or reimplement. * * @param e the SWT modify event */ protected void editOccured(ModifyEvent e) { String value = text.getText(); boolean oldValidState = isValueValid(); boolean newValidState = isCorrect(value); if (!newValidState) { // try to insert the current value into the error message. setErrorMessage(Messages.format(getErrorMessage(), new Object[] { value })); } valueChanged(oldValidState, newValidState); fireModifyEvent(text.getText()); // update model on-the-fly }
/** * Processes a modify event that occurred in this text cell editor. * This framework method performs validation and sets the error message * accordingly, and then reports a change via <code>fireEditorValueChanged</code>. * Subclasses should call this method at appropriate times. Subclasses * may extend or reimplement. * * @param e the SWT modify event */ protected void editOccured(ModifyEvent e) { String value = text.getText(); boolean oldValidState = isValueValid(); boolean newValidState = isCorrect(value); if (!newValidState) { // try to insert the current value into the error message. setErrorMessage(Messages.format(getErrorMessage(), new Object[] { value })); } valueChanged(oldValidState, newValidState); fireModifyEvent(text.getText()); // update model on-the-fly }
/** * Processes a modify event that occurred in this text cell editor. * This framework method performs validation and sets the error message * accordingly, and then reports a change via <code>fireEditorValueChanged</code>. * Subclasses should call this method at appropriate times. Subclasses * may extend or reimplement. * * @param e the SWT modify event */ protected void editOccured(ModifyEvent e) { String value = text.getText(); boolean oldValidState = isValueValid(); boolean newValidState = isCorrect(value); if (!newValidState) { // try to insert the current value into the error message. setErrorMessage(Messages.format(getErrorMessage(), new Object[] { value })); } valueChanged(oldValidState, newValidState); fireModifyEvent(text.getText()); // update model on-the-fly }