Java Code Examples for org.eclipse.swt.widgets.Text.addFocusListener()

The following are Jave code examples for showing how to use addFocusListener() of the org.eclipse.swt.widgets.Text class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: avro-schema-editor   File: TextValidator.java   Source Code and License Vote up 5 votes
public TextValidator(Text control, int position, IInputValidator validator, IValueChangeListener valueChangeListener) {
    this.validator = validator;
    this.valueChangeListener = valueChangeListener;
    this.deco = new ControlDecoration(control, position, control.getParent());
    this.deco.setMarginWidth(2);
    this.errorImg = AvroSchemaEditorActivator.getImage(AvroSchemaEditorImages.ERROR_OVERLAY);
    control.addModifyListener(this);
    control.addFocusListener(this);
    control.addKeyListener(this);
}