summaryrefslogtreecommitdiff
path: root/pdf-over-gui
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-08-04 11:30:38 +0200
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-08-04 11:30:38 +0200
commitff345952fc56b38bc27bb66f27f41073a0c46748 (patch)
treee7bb2513ac42da8bf094e932b1e6c00a98198b01 /pdf-over-gui
parent2624ca21244979af6118879dd4fd818f9c0b7383 (diff)
downloadpdf-over-ff345952fc56b38bc27bb66f27f41073a0c46748.tar.gz
pdf-over-ff345952fc56b38bc27bb66f27f41073a0c46748.tar.bz2
pdf-over-ff345952fc56b38bc27bb66f27f41073a0c46748.zip
batch replace setText -> setLocalizedText
Diffstat (limited to 'pdf-over-gui')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java21
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java7
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java11
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java9
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java9
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java9
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java7
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java16
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java46
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java18
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java20
14 files changed, 97 insertions, 92 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
index 16fb05f3..c03306cf 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
@@ -54,6 +54,7 @@ import at.asit.pdfover.gui.controls.MainBarMiddleButton;
import at.asit.pdfover.gui.controls.MainBarRectangleButton;
import at.asit.pdfover.gui.controls.MainBarStartButton;
import at.asit.pdfover.gui.osx.CocoaUIEnhancer;
+import at.asit.pdfover.gui.utils.SWTUtils;
import at.asit.pdfover.commons.Messages;
import at.asit.pdfover.gui.workflow.StateMachine;
import at.asit.pdfover.gui.workflow.states.BKUSelectionState;
@@ -175,18 +176,18 @@ public class MainWindow {
* Reload the localization
*/
public void reloadLocalization() {
- this.btn_config.setText(Messages.getString("main.configuration"));
+ SWTUtils.setLocalizedText(btn_config, "main.configuration");
this.btn_config.setToolTipText(Messages.getString("main.configuration"));
- this.btn_open.setText(Messages.getString("common.open"));
+ SWTUtils.setLocalizedText(btn_open, "common.open");
this.btn_open.setToolTipText(Messages.getString("common.open"));
- this.btn_position.setText(Messages.getString("main.position"));
+ SWTUtils.setLocalizedText(btn_position, "main.position");
this.btn_position.setToolTipText(Messages.getString("main.position"));
- this.btn_sign.setText(Messages.getString("main.signature"));
+ SWTUtils.setLocalizedText(btn_sign, "main.signature");
this.btn_sign.setToolTipText(Messages.getString("main.signature"));
- this.btn_end.setText(Messages.getString("main.done"));
+ SWTUtils.setLocalizedText(btn_end, "main.done");
this.btn_end.setToolTipText(Messages.getString("main.done"));
Control ctrl = this.stack.topControl;
@@ -260,7 +261,7 @@ public class MainWindow {
fd_btn_config.top = new FormAttachment(0);
fd_btn_config.left = new FormAttachment(0);
this.btn_config.setLayoutData(fd_btn_config);
- this.btn_config.setText(Messages.getString("main.configuration"));
+ SWTUtils.setLocalizedText(btn_config, "main.configuration");
this.btn_config
.setToolTipText(Messages.getString("main.configuration"));
this.btn_config.addMouseListener(new MouseAdapter() {
@@ -296,7 +297,7 @@ public class MainWindow {
fd_btn_open.top = new FormAttachment(0);
fd_btn_open.bottom = new FormAttachment(100);
this.btn_open.setLayoutData(fd_btn_open);
- this.btn_open.setText(Messages.getString("common.open"));
+ SWTUtils.setLocalizedText(btn_open, "common.open");
this.btn_open.setToolTipText(Messages.getString("common.open"));
this.btn_open.addMouseListener(new MouseAdapter() {
@@ -319,7 +320,7 @@ public class MainWindow {
fd_btn_position.top = new FormAttachment(0);
fd_btn_position.bottom = new FormAttachment(100);
this.btn_position.setLayoutData(fd_btn_position);
- this.btn_position.setText(Messages.getString("main.position"));
+ SWTUtils.setLocalizedText(btn_position, "main.position");
this.btn_position.setToolTipText(Messages.getString("main.position"));
this.btn_position.addMouseListener(new MouseAdapter() {
@@ -338,7 +339,7 @@ public class MainWindow {
fd_btn_sign.top = new FormAttachment(0);
fd_btn_sign.bottom = new FormAttachment(100);
this.btn_sign.setLayoutData(fd_btn_sign);
- this.btn_sign.setText(Messages.getString("main.signature"));
+ SWTUtils.setLocalizedText(btn_sign, "main.signature");
this.btn_sign.setToolTipText(Messages.getString("main.signature"));
this.btn_sign.addMouseListener(new MouseAdapter() {
@@ -357,7 +358,7 @@ public class MainWindow {
fd_btn_end.top = new FormAttachment(0);
fd_btn_end.bottom = new FormAttachment(100);
this.btn_end.setLayoutData(fd_btn_end);
- this.btn_end.setText(Messages.getString("main.done"));
+ SWTUtils.setLocalizedText(btn_end, "main.done");
this.btn_end.setToolTipText(Messages.getString("main.done"));
this.buttonMap.put(Buttons.FINAL, this.btn_end);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java
index 40fe6474..c02ebd40 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java
@@ -32,7 +32,6 @@ import org.slf4j.LoggerFactory;
import at.asit.pdfover.commons.Constants;
import at.asit.pdfover.gui.controls.ClickableCanvas;
-import at.asit.pdfover.commons.Messages;
import at.asit.pdfover.gui.utils.SWTUtils;
import at.asit.pdfover.gui.workflow.states.State;
import at.asit.pdfover.signator.BKUs;
@@ -230,9 +229,9 @@ public class BKUSelectionComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.btnMobile.setText(Messages.getString("bku_selection.mobile"));
- this.btnCard.setText(Messages.getString("bku_selection.card"));
+ SWTUtils.setLocalizedText(btnMobile, "bku_selection.mobile");
+ SWTUtils.setLocalizedText(btnCard, "bku_selection.card");
if (this.btnKS != null)
- this.btnKS.setText(Messages.getString("bku_selection.ks"));
+ SWTUtils.setLocalizedText(btnKS, "bku_selection.ks");
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
index bb214583..bacd4a50 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
@@ -215,7 +215,7 @@ public class ConfigurationComposite extends StateComposite {
public void keystoreEnabled(boolean enabled) {
if (enabled && this.keystoreConfigComposite == null) {
this.keystoreTabItem = new TabItem(this.tabFolder, SWT.NONE, 2);
- this.keystoreTabItem.setText(Messages.getString("config.Keystore"));
+ SWTUtils.setLocalizedText(keystoreTabItem, "config.Keystore");
ScrolledComposite keystoreCompositeScr = new ScrolledComposite(
this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
index 62b3b090..43e272a2 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
@@ -46,6 +46,7 @@ import org.slf4j.LoggerFactory;
import at.asit.pdfover.commons.Constants;
import at.asit.pdfover.commons.Messages;
+import at.asit.pdfover.gui.utils.SWTUtils;
import at.asit.pdfover.gui.workflow.states.State;
/**
@@ -263,7 +264,7 @@ public class DataSourceSelectComposite extends StateComposite {
FontData[] fD = this.lbl_drag.getFont().getFontData();
fD[0].setHeight(Constants.TEXT_SIZE_BIG);
this.lbl_drag.setFont(new Font(Display.getCurrent(), fD[0]));
- this.lbl_drag.setText(Messages.getString("dataSourceSelection.DropLabel"));
+ SWTUtils.setLocalizedText(lbl_drag, "dataSourceSelection.DropLabel");
this.lbl_drag.setAlignment(SWT.CENTER);
@@ -281,7 +282,7 @@ public class DataSourceSelectComposite extends StateComposite {
this.lbl_drag2.setAlignment(SWT.CENTER);
this.btn_open = new Button(this.drop_area, SWT.NATIVE | SWT.RESIZE);
- this.btn_open.setText(Messages.getString("dataSourceSelection.browse"));
+ SWTUtils.setLocalizedText(btn_open, "dataSourceSelection.browse");
FontData[] fD_open = this.btn_open.getFont().getFontData();
fD_open[0].setHeight(Constants.TEXT_SIZE_BUTTON);
@@ -356,8 +357,8 @@ public class DataSourceSelectComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.lbl_drag.setText(Messages.getString("dataSourceSelection.DropLabel"));
- this.btn_open.setText(Messages.getString("dataSourceSelection.browse"));
- this.lbl_drag2.setText(Messages.getString("dataSourceSelection.DropLabel2"));
+ SWTUtils.setLocalizedText(lbl_drag, "dataSourceSelection.DropLabel");
+ SWTUtils.setLocalizedText(btn_open, "dataSourceSelection.browse");
+ SWTUtils.setLocalizedText(lbl_drag2, "dataSourceSelection.DropLabel2");
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
index ac5044ae..40a10fd6 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
@@ -45,6 +45,7 @@ import org.slf4j.LoggerFactory;
import at.asit.pdfover.commons.Constants;
import at.asit.pdfover.commons.Messages;
+import at.asit.pdfover.gui.utils.SWTUtils;
import at.asit.pdfover.gui.workflow.states.State;
/**
@@ -373,7 +374,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
fd_lblTan.top = new FormAttachment(50, 10);
// fd_lblTan.bottom = new FormAttachment(50, 15);
this.lblTan.setLayoutData(fd_lblTan);
- this.lblTan.setText(Messages.getString("tanEnter.TAN"));
+ SWTUtils.setLocalizedText(lblTan, "tanEnter.TAN");
this.txt_tan = new Text(containerComposite, SWT.BORDER | SWT.NATIVE);
FormData fd_text = new FormData();
@@ -440,7 +441,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
fd_btn_ok.bottom = new FormAttachment(100, -20);
this.btn_ok.setLayoutData(fd_btn_ok);
- this.btn_ok.setText(Messages.getString("common.Ok"));
+ SWTUtils.setLocalizedText(btn_ok, "common.Ok");
this.btn_ok.addSelectionListener(new OkSelectionListener());
FormData fd_btn_cancel = new FormData();
@@ -450,7 +451,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
fd_btn_cancel.bottom = new FormAttachment(100, -20);
this.btn_cancel.setLayoutData(fd_btn_cancel);
- this.btn_cancel.setText(Messages.getString("common.Cancel"));
+ SWTUtils.setLocalizedText(btn_cancel, "common.Cancel");
this.btn_cancel.addSelectionListener(new CancelSelectionListener());
}
@@ -478,6 +479,6 @@ public class MobileBKUEnterTANComposite extends StateComposite {
public void reloadResources() {
this.lblRefValLabel.setText(Messages
.getString("tanEnter.ReferenceValue"));
- this.lblTan.setText(Messages.getString("tanEnter.TAN"));
+ SWTUtils.setLocalizedText(lblTan, "tanEnter.TAN");
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java
index 40630b49..d1affdd3 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java
@@ -40,6 +40,7 @@ import org.slf4j.LoggerFactory;
import at.asit.pdfover.commons.Constants;
import at.asit.pdfover.commons.Messages;
+import at.asit.pdfover.gui.utils.SWTUtils;
import at.asit.pdfover.gui.workflow.states.State;
/**
@@ -371,10 +372,10 @@ public class MobileBKUFingerprintComposite extends StateComposite {
public void reloadResources() {
this.lblRefValLabel.setText(Messages
.getString("tanEnter.ReferenceValue"));
- this.lblFPLabel.setText(Messages.getString("tanEnter.FP"));
- this.lnk_sig_data.setText(Messages.getString("mobileBKU.show"));
+ SWTUtils.setLocalizedText(lblFPLabel, "tanEnter.FP");
+ SWTUtils.setLocalizedText(lnk_sig_data, "mobileBKU.show");
this.lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip"));
- this.btn_cancel.setText(Messages.getString("common.Cancel"));
- this.btn_sms.setText(Messages.getString("tanEnter.SMS"));
+ SWTUtils.setLocalizedText(btn_cancel, "common.Cancel");
+ SWTUtils.setLocalizedText(btn_sms, "tanEnter.SMS");
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java
index 00820e46..32fb00d6 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java
@@ -42,6 +42,7 @@ import org.slf4j.LoggerFactory;
import at.asit.pdfover.commons.Constants;
import at.asit.pdfover.commons.Messages;
+import at.asit.pdfover.gui.utils.SWTUtils;
import at.asit.pdfover.gui.workflow.states.State;
/**
@@ -395,10 +396,10 @@ public class MobileBKUQRComposite extends StateComposite {
public void reloadResources() {
this.lblRefValLabel.setText(Messages
.getString("tanEnter.ReferenceValue"));
- this.lblQRLabel.setText(Messages.getString("tanEnter.QR"));
- this.lnk_sig_data.setText(Messages.getString("mobileBKU.show"));
+ SWTUtils.setLocalizedText(lblQRLabel, "tanEnter.QR");
+ SWTUtils.setLocalizedText(lnk_sig_data, "mobileBKU.show");
this.lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip"));
- this.btn_cancel.setText(Messages.getString("common.Cancel"));
- this.btn_sms.setText(Messages.getString("tanEnter.SMS"));
+ SWTUtils.setLocalizedText(btn_cancel, "common.Cancel");
+ SWTUtils.setLocalizedText(btn_sms, "tanEnter.SMS");
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
index 429d427a..05e23f10 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
@@ -46,6 +46,7 @@ import at.asit.pdfover.gui.controls.Dialog;
import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
import at.asit.pdfover.gui.controls.Dialog.ICON;
import at.asit.pdfover.gui.controls.ErrorDialog;
+import at.asit.pdfover.gui.utils.SWTUtils;
import at.asit.pdfover.commons.Messages;
import at.asit.pdfover.gui.workflow.states.State;
import at.asit.pdfover.signator.DocumentSource;
@@ -475,14 +476,14 @@ public class OutputComposite extends StateComposite {
this.lnk_saved_file.setText(Messages
.getString("output.link_open_message"));
}
- this.btn_save.setText(Messages.getString("common.Save"));
+ SWTUtils.setLocalizedText(btn_save, "common.Save");
}
/**
* @param str
*/
public void reReloadResources(String str) {
- this.lbl_success_message.setText(Messages.getString("output.success_message"));
+ SWTUtils.setLocalizedText(lbl_success_message, "output.success_message");
if (this.outputFile == null) {
this.lnk_saved_file.setText(Messages
.getString("output.link_save_message"));
@@ -491,7 +492,7 @@ public class OutputComposite extends StateComposite {
this.lbl_success_message.setText(str2);
this.lnk_saved_file.setText("");
}
- this.btn_save.setText(Messages.getString("common.Save"));
+ SWTUtils.setLocalizedText(btn_save, "common.Save");
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java
index b17b5ec3..d3a3952f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java
@@ -24,7 +24,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.ProgressBar;
-import at.asit.pdfover.commons.Messages;
+import at.asit.pdfover.gui.utils.SWTUtils;
import at.asit.pdfover.gui.workflow.states.State;
/**
@@ -50,7 +50,7 @@ public class WaitingComposite extends StateComposite {
fd_lbl_description.right = new FormAttachment(100, -10);
this.lbl_description.setLayoutData(fd_lbl_description);
this.lbl_description.setAlignment(SWT.CENTER);
- this.lbl_description.setText(Messages.getString("waiting.message"));
+ SWTUtils.setLocalizedText(lbl_description, "waiting.message");
ProgressBar progressBar = new ProgressBar(this, SWT.HORIZONTAL | SWT.INDETERMINATE);
FormData fd_progressBar = new FormData();
@@ -79,6 +79,6 @@ public class WaitingComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.lbl_description.setText(Messages.getString("waiting.message"));
+ SWTUtils.setLocalizedText(lbl_description, "waiting.message");
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
index 23451f22..ecdece98 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
@@ -24,7 +24,7 @@ import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.ProgressBar;
-import at.asit.pdfover.commons.Messages;
+import at.asit.pdfover.gui.utils.SWTUtils;
import at.asit.pdfover.gui.workflow.states.State;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.events.SelectionAdapter;
@@ -72,7 +72,7 @@ public class WaitingForAppComposite extends StateComposite {
fd_lbl_description.right = new FormAttachment(100, -10);
this.lbl_description.setLayoutData(fd_lbl_description);
this.lbl_description.setAlignment(SWT.CENTER);
- this.lbl_description.setText(Messages.getString("waiting_for_app.message"));
+ SWTUtils.setLocalizedText(lbl_description, "waiting_for_app.message");
ProgressBar progressBar = new ProgressBar(this, SWT.HORIZONTAL | SWT.INDETERMINATE);
FormData fd_progressBar = new FormData();
@@ -89,7 +89,7 @@ public class WaitingForAppComposite extends StateComposite {
fd_btnSMS.top = new FormAttachment(progressBar, 24);
fd_btnSMS.right = new FormAttachment(progressBar, 0, SWT.RIGHT);
this.btn_sms.setLayoutData(fd_btnSMS);
- this.btn_sms.setText(Messages.getString("SMS tan"));
+ SWTUtils.setLocalizedText(btn_sms, "SMS tan");
this.btn_cancel = new Button(this, SWT.NONE);
this.btn_cancel.addSelectionListener(new CancelSelectionListener());
@@ -97,7 +97,7 @@ public class WaitingForAppComposite extends StateComposite {
fd_btnCancel.top = new FormAttachment(btn_sms, 0, SWT.TOP);
fd_btnCancel.right = new FormAttachment(btn_sms, -6);
this.btn_cancel.setLayoutData(fd_btnCancel);
- this.btn_cancel.setText(Messages.getString("WaitingForAppComposite.btnCancel.text"));
+ SWTUtils.setLocalizedText(btn_cancel, "WaitingForAppComposite.btnCancel.text");
reloadResources();
@@ -162,10 +162,10 @@ public class WaitingForAppComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.lbl_description.setText(Messages.getString("waiting_for_app.message"));
- this.btn_sms.setText(Messages.getString("tanEnter.SMS"));
- this.btn_cancel.setText(Messages.getString("common.Cancel"));
- this.btn_sms.setText(Messages.getString("tanEnter.SMS"));
+ SWTUtils.setLocalizedText(lbl_description, "waiting_for_app.message");
+ SWTUtils.setLocalizedText(btn_sms, "tanEnter.SMS");
+ SWTUtils.setLocalizedText(btn_cancel, "common.Cancel");
+ SWTUtils.setLocalizedText(btn_sms, "tanEnter.SMS");
}
/**
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java
index 2582cf17..9134e490 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java
@@ -126,10 +126,10 @@ public class AboutComposite extends ConfigurationCompositeBase {
*/
@Override
public void reloadResources() {
- this.lnkAbout.setText(Messages.getString("config.AboutText"));
- this.lblDataProtection.setText(Messages.getString("config.DataProtection"));
- this.lnkDataProtection.setText(Messages.getString("config.DataProtectionStatement"));
- this.btnOpenLogDirectory.setText(Messages.getString("config.ShowLogDirectory"));
+ SWTUtils.setLocalizedText(lnkAbout, "config.AboutText");
+ SWTUtils.setLocalizedText(lblDataProtection, "config.DataProtection");
+ SWTUtils.setLocalizedText(lnkDataProtection, "config.DataProtectionStatement");
+ SWTUtils.setLocalizedText(btnOpenLogDirectory, "config.ShowLogDirectory");
}
@Override
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 66ad128a..1deb0cf1 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
@@ -829,53 +829,53 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
*/
@Override
public void reloadResources() {
- this.grpSignatur.setText(Messages.getString("advanced_config.Signature_Title"));
- this.btnAutomatischePositionierung.setText(Messages.getString("advanced_config.AutoPosition"));
+ SWTUtils.setLocalizedText(grpSignatur, "advanced_config.Signature_Title");
+ SWTUtils.setLocalizedText(btnAutomatischePositionierung, "advanced_config.AutoPosition");
this.btnAutomatischePositionierung.setToolTipText(Messages.getString("advanced_config.AutoPosition_ToolTip"));
- this.grpPlaceholder.setText(Messages.getString("advanced_config.Placeholder_Title"));
- this.btnPlatzhalterVerwenden.setText(Messages.getString("advanced_config.UseMarker"));
+ SWTUtils.setLocalizedText(grpPlaceholder, "advanced_config.Placeholder_Title");
+ SWTUtils.setLocalizedText(btnPlatzhalterVerwenden, "advanced_config.UseMarker");
this.btnPlatzhalterVerwenden.setToolTipText(Messages.getString("advanced_config.UseMarker_ToolTip"));
- this.btnSignatureFieldsUsage.setText(Messages.getString("advanced_config.UseSignatureFields"));
+ SWTUtils.setLocalizedText(btnSignatureFieldsUsage, "advanced_config.UseSignatureFields");
this.btnSignatureFieldsUsage.setToolTipText(Messages.getString("advanced_config.UseSignatureFields_ToolTip"));
- this.btnEnablePlaceholderUsage.setText(Messages.getString("advanced_config.Placeholder_Enabled"));
- this.btnPdfACompat.setText(Messages.getString("advanced_config.PdfACompat"));
+ SWTUtils.setLocalizedText(btnEnablePlaceholderUsage, "advanced_config.Placeholder_Enabled");
+ SWTUtils.setLocalizedText(btnPdfACompat, "advanced_config.PdfACompat");
this.btnPdfACompat.setToolTipText(Messages.getString("advanced_config.PdfACompat_ToolTip"));
- this.lblTransparenz.setText(Messages.getString("advanced_config.SigPHTransparency"));
- this.lblTransparenzLinks.setText(Messages.getString("advanced_config.SigPHTransparencyMin"));
- this.lblTransparenzRechts.setText(Messages.getString("advanced_config.SigPHTransparencyMax"));
+ SWTUtils.setLocalizedText(lblTransparenz, "advanced_config.SigPHTransparency");
+ SWTUtils.setLocalizedText(lblTransparenzLinks, "advanced_config.SigPHTransparencyMin");
+ SWTUtils.setLocalizedText(lblTransparenzRechts, "advanced_config.SigPHTransparencyMax");
this.sclTransparenz.setToolTipText(Messages.getString("advanced_config.SigPHTransparencyTooltip"));
- this.grpBkuAuswahl.setText(Messages.getString("advanced_config.BKUSelection_Title"));
+ SWTUtils.setLocalizedText(grpBkuAuswahl, "advanced_config.BKUSelection_Title");
this.cmbBKUAuswahl.setToolTipText(Messages.getString("advanced_config.BKUSelection_ToolTip"));
- this.btnKeystoreEnabled.setText(Messages.getString("advanced_config.KeystoreEnabled"));
+ SWTUtils.setLocalizedText(btnKeystoreEnabled, "advanced_config.KeystoreEnabled");
this.btnKeystoreEnabled.setToolTipText(Messages.getString("advanced_config.KeystoreEnabled_ToolTip"));
- this.grpSpeicherort.setText(Messages.getString("advanced_config.OutputFolder_Title"));
- this.lblDefaultOutputFolder.setText(Messages.getString("advanced_config.OutputFolder"));
+ SWTUtils.setLocalizedText(grpSpeicherort, "advanced_config.OutputFolder_Title");
+ SWTUtils.setLocalizedText(lblDefaultOutputFolder, "advanced_config.OutputFolder");
this.txtOutputFolder.setToolTipText(Messages.getString("advanced_config.OutputFolder_ToolTip"));
- this.btnBrowse.setText(Messages.getString("common.browse"));
+ SWTUtils.setLocalizedText(btnBrowse, "common.browse");
- this.grpLocaleAuswahl.setText(Messages.getString("advanced_config.LocaleSelection_Title"));
+ SWTUtils.setLocalizedText(grpLocaleAuswahl, "advanced_config.LocaleSelection_Title");
this.cmbLocaleAuswahl.setToolTipText(Messages.getString("advanced_config.LocaleSelection_ToolTip"));
- this.grpUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck_Title"));
- this.btnUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck"));
+ SWTUtils.setLocalizedText(grpUpdateCheck, "advanced_config.UpdateCheck_Title");
+ SWTUtils.setLocalizedText(btnUpdateCheck, "advanced_config.UpdateCheck");
this.btnUpdateCheck.setToolTipText(Messages.getString("advanced_config.UpdateCheck_ToolTip"));
- this.grpProxy.setText(Messages.getString("advanced_config.Proxy_Title"));
- this.lblProxyHost.setText(Messages.getString("advanced_config.ProxyHost"));
+ SWTUtils.setLocalizedText(grpProxy, "advanced_config.Proxy_Title");
+ SWTUtils.setLocalizedText(lblProxyHost, "advanced_config.ProxyHost");
this.txtProxyHost.setToolTipText(Messages.getString("advanced_config.ProxyHost_ToolTip"));
this.txtProxyHost.setMessage(Messages.getString("advanced_config.ProxyHost_Template"));
- this.lblProxyPort.setText(Messages.getString("advanced_config.ProxyPort"));
+ SWTUtils.setLocalizedText(lblProxyPort, "advanced_config.ProxyPort");
this.txtProxyPort.setToolTipText(Messages.getString("advanced_config.ProxyPort_ToolTip"));
this.txtProxyPort.setMessage(Messages.getString("advanced_config.ProxyPort_Template"));
- // this.lblProxyUser.setText(Messages.getString("advanced_config.ProxyUser"));
+ // StateComposite.setLocalizedText(lblProxyUser, "advanced_config.ProxyUser");
// this.txtProxyUser.setToolTipText(Messages
// .getString("advanced_config.ProxyUser_ToolTip"));
// this.txtProxyUser.setMessage(Messages
// .getString("advanced_config.ProxyUser_Template"));
- // this.lblProxyPass.setText(Messages.getString("advanced_config.ProxyPass"));
+ // StateComposite.setLocalizedText(lblProxyPass, "advanced_config.ProxyPass");
// this.txtProxyPass.setToolTipText(Messages
// .getString("advanced_config.ProxyPass_ToolTip"));
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
index 1d1efb06..d8c40ed1 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
@@ -577,21 +577,21 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
@Override
public void reloadResources() {
- this.grpKeystore.setText(Messages.getString("keystore_config.Keystore_Title"));
- this.lblKeystoreFile.setText(Messages.getString("keystore_config.KeystoreFile"));
- this.btnBrowse.setText(Messages.getString("common.browse"));
+ SWTUtils.setLocalizedText(grpKeystore, "keystore_config.Keystore_Title");
+ SWTUtils.setLocalizedText(lblKeystoreFile, "keystore_config.KeystoreFile");
+ SWTUtils.setLocalizedText(btnBrowse, "common.browse");
this.txtKeystoreFile.setToolTipText(Messages.getString("keystore_config.KeystoreFile_ToolTip"));
- this.lblKeystoreType.setText(Messages.getString("keystore_config.KeystoreType"));
+ SWTUtils.setLocalizedText(lblKeystoreType, "keystore_config.KeystoreType");
reloadKeystoreTypeStrings();
- this.lblKeystorePassStoreType.setText(Messages.getString("keystore_config.SaveToWhere.Header"));
+ SWTUtils.setLocalizedText(lblKeystorePassStoreType, "keystore_config.SaveToWhere.Header");
reloadKeystorePassStorageTypeStrings();
this.cmbKeystoreType.setItems(this.keystoreTypes.keySet().toArray(new String[0]));
- this.lblKeystoreStorePass.setText(Messages.getString("keystore_config.KeystoreStorePass"));
+ SWTUtils.setLocalizedText(lblKeystoreStorePass, "keystore_config.KeystoreStorePass");
this.txtKeystoreStorePass.setToolTipText(Messages.getString("keystore_config.KeystoreStorePass_ToolTip"));
- this.btnLoad.setText(Messages.getString("keystore_config.Load"));
+ SWTUtils.setLocalizedText(btnLoad, "keystore_config.Load");
this.btnLoad.setToolTipText(Messages.getString("keystore_config.Load_ToolTip"));
- this.lblKeystoreAlias.setText(Messages.getString("keystore_config.KeystoreAlias"));
- this.lblKeystoreKeyPass.setText(Messages.getString("keystore_config.KeystoreKeyPass"));
+ SWTUtils.setLocalizedText(lblKeystoreAlias, "keystore_config.KeystoreAlias");
+ SWTUtils.setLocalizedText(lblKeystoreKeyPass, "keystore_config.KeystoreKeyPass");
this.txtKeystoreKeyPass.setToolTipText(Messages.getString("keystore_config.KeystoreKeyPass_ToolTip"));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java
index 9aedf686..5e5895ff 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java
@@ -644,23 +644,23 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
*/
@Override
public void reloadResources() {
- this.grpHandySignatur.setText(Messages.getString("simple_config.MobileBKU_Title"));
- this.lblMobileNumber.setText(Messages.getString("simple_config.PhoneNumber"));
+ SWTUtils.setLocalizedText(grpHandySignatur, "simple_config.MobileBKU_Title");
+ SWTUtils.setLocalizedText(lblMobileNumber, "simple_config.PhoneNumber");
this.txtMobileNumber.setToolTipText(Messages.getString("simple_config.ExampleNumber_ToolTip"));
this.txtMobileNumber.setMessage(Messages.getString("simple_config.ExampleNumber"));
- this.grpPreview.setText(Messages.getString("simple_config.Preview_Title"));
- this.btnClearImage.setText(Messages.getString("simple_config.ClearEmblem"));
- this.btnBrowseLogo.setText(Messages.getString("simple_config.ReplaceEmblem"));
- this.grpSignatureNote.setText(Messages.getString("simple_config.Note_Title"));
- this.lblSignatureNote.setText(Messages.getString("simple_config.Note"));
+ SWTUtils.setLocalizedText(grpPreview, "simple_config.Preview_Title");
+ SWTUtils.setLocalizedText(btnClearImage, "simple_config.ClearEmblem");
+ SWTUtils.setLocalizedText(btnBrowseLogo, "simple_config.ReplaceEmblem");
+ SWTUtils.setLocalizedText(grpSignatureNote, "simple_config.Note_Title");
+ SWTUtils.setLocalizedText(lblSignatureNote, "simple_config.Note");
this.txtSignatureNote.setToolTipText(Messages.getString("simple_config.Note_Tooltip"));
- this.btnSignatureNoteDefault.setText(Messages.getString("simple_config.Note_SetDefault"));
+ SWTUtils.setLocalizedText(btnSignatureNoteDefault, "simple_config.Note_SetDefault");
- this.grpSignatureLang.setText(Messages.getString("simple_config.SigBlockLang_Title"));
+ SWTUtils.setLocalizedText(grpSignatureLang, "simple_config.SigBlockLang_Title");
this.cmbSignatureLang.setToolTipText(Messages.getString("simple_config.SigBlockLang_ToolTip"));
- this.grpSignatureProfile.setText(Messages.getString("simple_config.SigProfile_Title"));
+ SWTUtils.setLocalizedText(grpSignatureProfile, "simple_config.SigProfile_Title");
this.cmbSignatureProfiles.setItems(Arrays.stream(Profile.values()).map(v -> Messages.getString("simple_config."+v.name())).toArray(String[]::new));
}
}