Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace usage of internal SWT TypedListener in CheckTableCombo #613

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.TypedListener;
import org.eclipse.swt.widgets.Widget;

/**
Expand Down Expand Up @@ -283,12 +282,7 @@ private static int checkStyle(int style) {
* @see #removeModifyListener
*/
public void addModifyListener(final ModifyListener listener) {
checkWidget();
if (listener == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
final TypedListener typedListener = new TypedListener(listener);
addListener(SWT.Modify, typedListener);
addTypedListener(listener, SWT.Modify);
}

/**
Expand Down Expand Up @@ -316,14 +310,7 @@ public void addModifyListener(final ModifyListener listener) {
* @see SelectionEvent
*/
public void addSelectionListener(final SelectionListener listener) {
checkWidget();
if (listener == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}

final TypedListener typedListener = new TypedListener(listener);
addListener(SWT.Selection, typedListener);
addListener(SWT.DefaultSelection, typedListener);
addTypedListener(listener, SWT.Selection, SWT.DefaultSelection);
}

/**
Expand Down Expand Up @@ -395,12 +382,7 @@ public void removeTextControlKeyListener(final KeyListener listener) {
* @since 3.3
*/
public void addVerifyListener(final VerifyListener listener) {
checkWidget();
if (listener == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
final TypedListener typedListener = new TypedListener(listener);
addListener(SWT.Verify, typedListener);
addTypedListener(listener, SWT.Verify);
}

/**
Expand Down
Loading