summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:15:04 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:15:04 +0000
commit620b7500e3e590d6ad67425aece586103f329d70 (patch)
treef1f528113de4bc626d6b94804c3c74ac2c4ede47 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
parentd8f1e6183bf5af499bf733033be7b5a2dd997a7e (diff)
downloadpdf-over-620b7500e3e590d6ad67425aece586103f329d70.tar.gz
pdf-over-620b7500e3e590d6ad67425aece586103f329d70.tar.bz2
pdf-over-620b7500e3e590d6ad67425aece586103f329d70.zip
Merge branch 'master' of git@abyss:12PDF-OVER-4.0.git
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@221 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java42
1 files changed, 37 insertions, 5 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 a4798c28..8d633517 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
@@ -105,6 +105,8 @@ public class MainWindow {
private Map<Buttons, MainBarButton> buttonMap;
+ private MainBarEndButton btn_end;
+
/**
* Default constructor
*
@@ -143,6 +145,7 @@ public class MainWindow {
if (ctrl instanceof StateComposite) {
if (!ctrl.isDisposed()) {
((StateComposite) ctrl).doLayout();
+ ((StateComposite) ctrl).reloadResources();
}
}
}
@@ -166,6 +169,35 @@ public class MainWindow {
}
/**
+ * Reload the localization
+ */
+ public void reloadLocalization() {
+ getShell().setText(Messages.getString("main.title")); //$NON-NLS-1$
+ this.btn_config.setText(Messages.getString("main.configuration")); //$NON-NLS-1$
+ this.btn_config.setToolTipText(Messages.getString("main.configuration")); //$NON-NLS-1$
+ this.btn_open.setText(Messages.getString("common.open")); //$NON-NLS-1$
+ this.btn_open.setToolTipText(Messages.getString("common.open")); //$NON-NLS-1$
+
+ this.btn_position.setText(Messages.getString("main.position")); //$NON-NLS-1$
+ this.btn_position.setToolTipText(Messages.getString("main.position")); //$NON-NLS-1$
+
+
+ this.btn_sign.setText(Messages.getString("main.signature")); //$NON-NLS-1$
+ this.btn_sign.setToolTipText(Messages.getString("main.signature")); //$NON-NLS-1$
+
+
+ this.btn_end.setText(Messages.getString("main.done")); //$NON-NLS-1$
+ this.btn_end.setToolTipText(Messages.getString("main.done")); //$NON-NLS-1$
+
+ Control ctrl = this.stack.topControl;
+ if (ctrl instanceof StateComposite) {
+ if (!ctrl.isDisposed()) {
+ ((StateComposite) ctrl).reloadResources();
+ }
+ }
+ }
+
+ /**
* Create contents of the window.
*/
protected void createContents() {
@@ -293,16 +325,16 @@ public class MainWindow {
});
this.buttonMap.put(Buttons.SIGN, this.btn_sign);
- MainBarEndButton end = new MainBarEndButton(mainbarContainer, SWT.NONE);
+ this.btn_end = new MainBarEndButton(mainbarContainer, SWT.NONE);
FormData fd_btn_end = new FormData();
fd_btn_end.left = new FormAttachment(81, -1 * (MainBarButton.SplitFactor / 2));
fd_btn_end.right = new FormAttachment(100);
fd_btn_end.top = new FormAttachment(0);
fd_btn_end.bottom = new FormAttachment(100);
- end.setLayoutData(fd_btn_end);
- end.setText(Messages.getString("main.done")); //$NON-NLS-1$
- end.setToolTipText(Messages.getString("main.done")); //$NON-NLS-1$
- this.buttonMap.put(Buttons.FINAL, end);
+ this.btn_end.setLayoutData(fd_btn_end);
+ this.btn_end.setText(Messages.getString("main.done")); //$NON-NLS-1$
+ this.btn_end.setToolTipText(Messages.getString("main.done")); //$NON-NLS-1$
+ this.buttonMap.put(Buttons.FINAL, this.btn_end);
this.container = new Composite(getShell(), SWT.RESIZE);
this.containerFormData = new FormData();