From 96588895b599d08d21264f34190e37f695c0489f Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Thu, 6 Oct 2022 11:22:15 +0200 Subject: out with the old --- .../mobilebku/MobileBKUEnterTANComposite.java | 31 ++++++---------------- 1 file changed, 8 insertions(+), 23 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUEnterTANComposite.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUEnterTANComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUEnterTANComposite.java index dfd9dc40..b326edfa 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUEnterTANComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/mobilebku/MobileBKUEnterTANComposite.java @@ -37,7 +37,6 @@ import com.beust.jcommander.internal.Nullable; import at.asit.pdfover.commons.Constants; import at.asit.pdfover.commons.Messages; -import at.asit.pdfover.gui.bku.OLDmobile.ATrustStatus; import at.asit.pdfover.gui.composites.StateComposite; import at.asit.pdfover.gui.utils.SWTUtils; import at.asit.pdfover.gui.workflow.states.State; @@ -101,7 +100,7 @@ public class MobileBKUEnterTANComposite extends StateComposite { private Link lnk_sig_data; - private Label lblTries; + private Label lblMessage; private Label lblRefValLabel; private Label lblTan; @@ -116,29 +115,15 @@ public class MobileBKUEnterTANComposite extends StateComposite { public void reset() { this.userAck = this.userCancel = this.userFido2 = false; } - /** - * Set how many tries are left - * - * @param tries - */ - public void setTries(int tries) { - if ((tries > 0) && (tries < ATrustStatus.MOBILE_MAX_TAN_TRIES)) { - if (tries > 1) - SWTUtils.setLocalizedText(lblTries, "tanEnter.try"); - else - SWTUtils.setLocalizedText(lblTries, "tanEnter.tries", tries); - } - } - /** * Set an error message * @param errorMessage the error message */ public void setErrorMessage(String errorMessage) { if (errorMessage == null) - this.lblTries.setText(""); + this.lblMessage.setText(""); else - this.lblTries.setText( + this.lblMessage.setText( Messages.getString("error.Title") + ": " + errorMessage); } @@ -152,9 +137,9 @@ public class MobileBKUEnterTANComposite extends StateComposite { * @param msg */ public void setMessage(String msg) { - this.lblTries.setText(msg); - this.lblTries.redraw(); - this.lblTries.getParent().layout(true, true); + this.lblMessage.setText(msg); + this.lblMessage.redraw(); + this.lblMessage.getParent().layout(true, true); } /** @@ -280,8 +265,8 @@ public class MobileBKUEnterTANComposite extends StateComposite { SWTUtils.anchor(btn_fido2).right(btn_cancel, -20).bottom(100, -20); SWTUtils.addSelectionListener(btn_fido2, (e) -> { this.userFido2 = true; }); - this.lblTries = new Label(containerComposite, SWT.WRAP | SWT.NATIVE); - SWTUtils.anchor(lblTries).right(btn_fido2, -10).bottom(100, -20); + this.lblMessage = new Label(containerComposite, SWT.WRAP | SWT.NATIVE); + SWTUtils.anchor(lblMessage).right(btn_fido2, -10).bottom(100, -20); } @Override -- cgit v1.2.3