diff options
author | vkrnjic <vkrnjic@klio.iaik.tugraz.at> | 2012-11-07 13:38:31 +0100 |
---|---|---|
committer | vkrnjic <vkrnjic@klio.iaik.tugraz.at> | 2012-11-07 13:38:31 +0100 |
commit | 21b2098558c91a8827c869094d0d65fabece7f3b (patch) | |
tree | 0e402dc03e8850b89bf2c40068b30c7d52b9a6e0 /trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java | |
parent | 65295f0dcef138959d37abbe2c9914adfde98cf8 (diff) | |
parent | 2510d4deffa1634593600076e7d5446d2982c9bb (diff) | |
download | pdf-over-21b2098558c91a8827c869094d0d65fabece7f3b.tar.gz pdf-over-21b2098558c91a8827c869094d0d65fabece7f3b.tar.bz2 pdf-over-21b2098558c91a8827c869094d0d65fabece7f3b.zip |
Merge branch 'master' of git@abyss:12PDF-OVER-4.0.git
Diffstat (limited to 'trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java')
-rw-r--r-- | trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java index a4798c28..8d633517 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java +++ b/trunk/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(); |