From c2b027867409b9f31f6c4c2713820f8fed1d76c4 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Mon, 17 Feb 2020 15:38:02 +0100 Subject: messages text changed, radio button added --- .../composites/AdvancedConfigurationComposite.java | 82 ++++++++++++++++------ .../at/asit/pdfover/gui/messages.properties | 4 +- .../at/asit/pdfover/gui/messages_de.properties | 4 +- 3 files changed, 67 insertions(+), 23 deletions(-) (limited to 'pdf-over-gui/src') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java index e2a1e0a1..d2c21cab 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java @@ -79,9 +79,11 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { private ConfigurationComposite configurationComposite; private Group grpSignatur; + private Group grpPlaceholder; Button btnAutomatischePositionierung; Button btnPdfACompat; Button btnPlatzhalterVerwenden; + Button btnSignatureFieldsUsage; private Label lblTransparenz; private Label lblTransparenzLinks; private Label lblTransparenzRechts; @@ -174,31 +176,14 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { .getSelection()); } }); - - this.btnPlatzhalterVerwenden = new Button(this.grpSignatur, SWT.CHECK); - FormData fd_btnPlatzhalterVerwenden = new FormData(); - fd_btnPlatzhalterVerwenden.right = new FormAttachment(100, -5); - fd_btnPlatzhalterVerwenden.top = new FormAttachment(this.btnAutomatischePositionierung, 5); - fd_btnPlatzhalterVerwenden.left = new FormAttachment(0, 5); - this.btnPlatzhalterVerwenden.setLayoutData(fd_btnPlatzhalterVerwenden); - - FontData[] fD_btnPlatzhalterVerwenden = this.btnPlatzhalterVerwenden.getFont().getFontData(); - fD_btnPlatzhalterVerwenden[0].setHeight(Constants.TEXT_SIZE_BUTTON); - this.btnPlatzhalterVerwenden.setFont(new Font(Display.getCurrent(), fD_btnPlatzhalterVerwenden[0])); - - this.btnPlatzhalterVerwenden.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - AdvancedConfigurationComposite.this.performUseMarkerSelection( - AdvancedConfigurationComposite.this.btnPlatzhalterVerwenden.getSelection()); - } - }); + + this.btnPdfACompat = new Button(this.grpSignatur, SWT.CHECK); FormData fd_btnPdfACompat = new FormData(); fd_btnPdfACompat.right = new FormAttachment(100, -5); fd_btnPdfACompat.top = new FormAttachment( - this.btnPlatzhalterVerwenden, 5); + this.btnSignatureFieldsUsage, 5); fd_btnPdfACompat.left = new FormAttachment(0, 5); this.btnPdfACompat .setLayoutData(fd_btnPdfACompat); @@ -273,6 +258,59 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { .getSelection()); } }); + + + this.grpPlaceholder = new Group(this, SWT.NONE); + FormLayout layout_grpPlaceholder = new FormLayout(); + layout_grpPlaceholder.marginHeight = 10; + layout_grpPlaceholder.marginWidth = 5; + this.grpPlaceholder.setLayout(layout_grpPlaceholder); + + FormData fd_grpPlaceholder = new FormData(); + fd_grpPlaceholder.top = new FormAttachment(this.grpSignatur, 5); + fd_grpPlaceholder.right = new FormAttachment(100, -5); + fd_grpPlaceholder.left = new FormAttachment(0, 5); + this.grpPlaceholder.setLayoutData(fd_grpPlaceholder); + + this.btnPlatzhalterVerwenden = new Button(this.grpPlaceholder, SWT.RADIO); + FormData fd_btnPlatzhalterVerwenden = new FormData(); + fd_btnPlatzhalterVerwenden.right = new FormAttachment(100, -5); + fd_btnPlatzhalterVerwenden.top = new FormAttachment(0, 5); + fd_btnPlatzhalterVerwenden.left = new FormAttachment(0, 5); + this.btnPlatzhalterVerwenden.setLayoutData(fd_btnPlatzhalterVerwenden); + + FontData[] fD_btnPlatzhalterVerwenden = this.btnPlatzhalterVerwenden.getFont().getFontData(); + fD_btnPlatzhalterVerwenden[0].setHeight(Constants.TEXT_SIZE_BUTTON); + this.btnPlatzhalterVerwenden.setFont(new Font(Display.getCurrent(), fD_btnPlatzhalterVerwenden[0])); + + this.btnPlatzhalterVerwenden.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + AdvancedConfigurationComposite.this.performUseMarkerSelection( + AdvancedConfigurationComposite.this.btnPlatzhalterVerwenden.getSelection()); + } + }); + + this.btnSignatureFieldsUsage = new Button(this.grpPlaceholder, SWT.RADIO); + FormData fd_btnSignatureFieldsUsage = new FormData(); + fd_btnSignatureFieldsUsage.right = new FormAttachment(100, -5); + fd_btnSignatureFieldsUsage.top = new FormAttachment(this.btnPlatzhalterVerwenden, 5); + fd_btnSignatureFieldsUsage.left = new FormAttachment(0, 5); + this.btnSignatureFieldsUsage.setLayoutData(fd_btnSignatureFieldsUsage); + + + FontData[] fD_btnSignatureFieldsUsage = this.btnSignatureFieldsUsage.getFont().getFontData(); + fD_btnSignatureFieldsUsage[0].setHeight(Constants.TEXT_SIZE_BUTTON); + this.btnSignatureFieldsUsage.setFont(new Font(Display.getCurrent(), fD_btnSignatureFieldsUsage[0])); + + this.btnSignatureFieldsUsage.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + AdvancedConfigurationComposite.this.performUseMarkerSelection( + AdvancedConfigurationComposite.this.btnSignatureFieldsUsage.getSelection()); + } + }); + this.grpBkuAuswahl = new Group(this, SWT.NONE); layout = new FormLayout(); @@ -280,7 +318,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { layout.marginWidth = 5; this.grpBkuAuswahl.setLayout(layout); FormData fd_grpBkuAuswahl = new FormData(); - fd_grpBkuAuswahl.top = new FormAttachment(this.grpSignatur, 5); + fd_grpBkuAuswahl.top = new FormAttachment(this.grpPlaceholder, 5); fd_grpBkuAuswahl.left = new FormAttachment(0, 5); fd_grpBkuAuswahl.right = new FormAttachment(100, -5); this.grpBkuAuswahl.setLayoutData(fd_grpBkuAuswahl); @@ -1189,6 +1227,8 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { .getString("advanced_config.AutoPosition_ToolTip")); //$NON-NLS-1$ this.btnPlatzhalterVerwenden.setText(Messages.getString("advanced_config.UseMarker")); //$NON-NLS-1$ this.btnPlatzhalterVerwenden.setToolTipText(Messages.getString("advanced_config.UseMarker_ToolTip")); //$NON-NLS-1$ + this.btnSignatureFieldsUsage.setText(Messages.getString("advanced_config.UseSignatureFields")); //$NON-NLS-1$ + this.btnSignatureFieldsUsage.setToolTipText(Messages.getString("advanced_config.UseSignatureFields_ToolTip")); //$NON-NLS-1$ this.btnPdfACompat.setText(Messages .getString("advanced_config.PdfACompat")); //$NON-NLS-1$ this.btnPdfACompat.setToolTipText(Messages diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties index a9512f28..0acfe967 100644 --- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties +++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties @@ -49,8 +49,10 @@ advanced_config.Signature_Title=Si&gnature advanced_config.UpdateCheck=Automatically check for updates advanced_config.UpdateCheck_Title=Updates advanced_config.UpdateCheck_ToolTip=Shows a notification when a new version is available -advanced_config.UseMarker=Search for signature markers +advanced_config.UseMarker=Search for QR-Code signature markers advanced_config.UseMarker_ToolTip=Activate this option to scan the document for signature markers. In case there is a marker available, you will be asked whether to automatically position your signature according to the marker. +advanced_config.UseSignatureFields=Search for signature fields +advanced_config.UseSignatureFields_ToolTip=Activate this option to scan the document for signature markers. In case there is a marker available, you will be asked whether to automatically position your signature according to the marker. argument.error.output=is not a directory argument.help.autopos=Enables automatic signature positioning argument.help.bku=Select the CCE to use. Possible values are\: LOCAL, MOBILE, KS. Example\: -b MOBILE diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties index 5559d10e..ef978654 100644 --- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties +++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties @@ -42,8 +42,10 @@ advanced_config.Signature_Title=Si&gnatur advanced_config.UpdateCheck=Automatisch auf Updates \u00FCberpr\u00FCfen advanced_config.UpdateCheck_Title=Updates advanced_config.UpdateCheck_ToolTip=Zeigt eine Benachrichtigung, wenn eine neue Version verf\u00FCgbar ist -advanced_config.UseMarker=Nach Signaturplatzhaltern suchen +advanced_config.UseMarker=Nach QR-Code Signaturplatzhaltern suchen advanced_config.UseMarker_ToolTip=Aktivieren Sie diese Option, um das Dokument nach Signaturplatzhaltern zu durchsuchen. Sollte ein Platzhatler gefunden werden werden Sie gefragt ob Sie die Signatur in den Platzhalter einf\u00FCgen wollen. +advanced_config.UseSignatureFields=Nach Signaturfelder-Platzhaltern suchen +advanced_config.UseSignatureFields_ToolTip=Aktivieren Sie diese Option, um das Dokument nach Signaturplatzhaltern zu durchsuchen. Sollte ein Platzhatler gefunden werden werden Sie gefragt ob Sie die Signatur in den Platzhalter einf\u00FCgen wollen. argument.error.output=ist kein Ordner argument.help.autopos=Aktiviert automatische Positionierung der Signatur argument.help.bku=W\u00E4hlen Sie die BKU. G\u00FCltige Werte\: LOCAL, MOBILE, KS. Bsp.\: -b MOBILE -- cgit v1.2.3