From 6d43cce57176151de8fdb6bd0a29663b0ea107bb Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Tue, 9 Aug 2022 12:24:53 +0200 Subject: typo --- .../gui/composites/configuration/AdvancedConfigurationComposite.java | 1 - pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'pdf-over-gui/src') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java index c7454276..4736fecc 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java @@ -183,7 +183,6 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase { this.btnKeystoreEnabled = new Button(this.grpBkuAuswahl, SWT.CHECK); SWTUtils.anchor(btnKeystoreEnabled).right(100,-5).top(cmbBKUAuswahl,5).left(0,5).set(); SWTUtils.setFontHeight(btnKeystoreEnabled, Constants.TEXT_SIZE_BUTTON); - SWTUtils.addSelectionListener(btnKeystoreEnabled, e -> { performKeystoreEnabledSelection(btnKeystoreEnabled.getSelection()); }); this.grpSpeicherort = new Group(this, SWT.NONE); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java index ebeda252..a95cd7f5 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java @@ -6,6 +6,7 @@ import java.util.function.Consumer; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.FontData; import org.eclipse.swt.layout.FormAttachment; @@ -130,7 +131,7 @@ public final class SWTUtils { */ public static void addSelectionListener(Object swtObj, Consumer callback) { try { - Method m = swtObj.getClass().getMethod("addSelectionListener", SelectionAdapter.class); + Method m = swtObj.getClass().getMethod("addSelectionListener", SelectionListener.class); m.invoke(swtObj, new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { callback.accept(e); } }); } catch (NoSuchMethodException | IllegalAccessException e) { log.error("Attempted to pass object of type {} to onSelectionChanged; object does not have an accessible addSelectionListener method", swtObj.getClass().getSimpleName(), e); -- cgit v1.2.3