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/composites/ConfigurationComposite.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/composites/ConfigurationComposite.java')
-rw-r--r-- | trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java | 70 |
1 files changed, 47 insertions, 23 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java index f87604f0..9376c0ae 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java @@ -98,12 +98,12 @@ public class ConfigurationComposite extends StateComposite { fD_tabFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL); tabFolder.setFont(new Font(Display.getCurrent(), fD_tabFolder[0])); - TabItem simpleTabItem = new TabItem(tabFolder, SWT.NONE); - simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$ + this.simpleTabItem = new TabItem(tabFolder, SWT.NONE); + this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$ ScrolledComposite simpleCompositeScr = new ScrolledComposite(tabFolder, SWT.H_SCROLL | SWT.V_SCROLL); - simpleTabItem.setControl(simpleCompositeScr); + this.simpleTabItem.setControl(simpleCompositeScr); this.simpleConfigComposite = new SimpleConfigurationComposite( simpleCompositeScr, SWT.NONE, state, this.configurationContainer); @@ -113,12 +113,12 @@ public class ConfigurationComposite extends StateComposite { simpleCompositeScr.setMinSize(this.simpleConfigComposite.computeSize( SWT.DEFAULT, SWT.DEFAULT)); - TabItem advancedTabItem = new TabItem(tabFolder, SWT.NONE); - advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$ + this.advancedTabItem = new TabItem(tabFolder, SWT.NONE); + this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$ ScrolledComposite advancedCompositeScr = new ScrolledComposite( tabFolder, SWT.H_SCROLL | SWT.V_SCROLL); - advancedTabItem.setControl(advancedCompositeScr); + this.advancedTabItem.setControl(advancedCompositeScr); this.advancedConfigComposite = new AdvancedConfigurationComposite( advancedCompositeScr, SWT.NONE, state, this.configurationContainer); @@ -128,14 +128,14 @@ public class ConfigurationComposite extends StateComposite { advancedCompositeScr.setMinSize(this.advancedConfigComposite .computeSize(SWT.DEFAULT, SWT.DEFAULT)); - tabFolder.setSelection(simpleTabItem); + tabFolder.setSelection(this.simpleTabItem); - Button btnSpeichern = new Button(this, SWT.NONE); + this.btnSpeichern = new Button(this, SWT.NONE); FormData fd_btnSpeichern = new FormData(); fd_btnSpeichern.right = new FormAttachment(100, -5); fd_btnSpeichern.bottom = new FormAttachment(100); - btnSpeichern.setLayoutData(fd_btnSpeichern); - btnSpeichern.addSelectionListener(new SelectionAdapter() { + this.btnSpeichern.setLayoutData(fd_btnSpeichern); + this.btnSpeichern.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (ConfigurationComposite.this.storeConfiguration()) { @@ -144,21 +144,21 @@ public class ConfigurationComposite extends StateComposite { } } }); - btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$ - this.getShell().setDefaultButton(btnSpeichern); + this.btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$ + this.getShell().setDefaultButton(this.btnSpeichern); - FontData[] fD_btnSpeichern = btnSpeichern.getFont().getFontData(); + FontData[] fD_btnSpeichern = this.btnSpeichern.getFont().getFontData(); fD_btnSpeichern[0].setHeight(Constants.TEXT_SIZE_BUTTON); - btnSpeichern + this.btnSpeichern .setFont(new Font(Display.getCurrent(), fD_btnSpeichern[0])); - Button btnAbbrechen = new Button(this, SWT.NONE); + this.btnAbbrechen = new Button(this, SWT.NONE); FormData fd_btnAbrechen = new FormData(); - fd_btnAbrechen.right = new FormAttachment(btnSpeichern, -10); - fd_btnAbrechen.bottom = new FormAttachment(btnSpeichern, 0, SWT.BOTTOM); - btnAbbrechen.setLayoutData(fd_btnAbrechen); - btnAbbrechen.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$ - btnAbbrechen.addSelectionListener(new SelectionAdapter() { + fd_btnAbrechen.right = new FormAttachment(this.btnSpeichern, -10); + fd_btnAbrechen.bottom = new FormAttachment(this.btnSpeichern, 0, SWT.BOTTOM); + this.btnAbbrechen.setLayoutData(fd_btnAbrechen); + this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$ + this.btnAbbrechen.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { ConfigurationComposite.this.userDone = true; @@ -166,14 +166,14 @@ public class ConfigurationComposite extends StateComposite { } }); - FontData[] fD_btnAbbrechen = btnAbbrechen.getFont().getFontData(); + FontData[] fD_btnAbbrechen = this.btnAbbrechen.getFont().getFontData(); fD_btnAbbrechen[0].setHeight(Constants.TEXT_SIZE_BUTTON); - btnAbbrechen + this.btnAbbrechen .setFont(new Font(Display.getCurrent(), fD_btnAbbrechen[0])); FormData fd_composite = new FormData(); fd_composite.top = new FormAttachment(0, 5); - fd_composite.bottom = new FormAttachment(btnSpeichern, -10); + fd_composite.bottom = new FormAttachment(this.btnSpeichern, -10); fd_composite.left = new FormAttachment(0, 5); fd_composite.right = new FormAttachment(100, -5); this.containerComposite.setLayoutData(fd_composite); @@ -249,6 +249,14 @@ public class ConfigurationComposite extends StateComposite { */ boolean userDone = false; + private TabItem simpleTabItem; + + private TabItem advancedTabItem; + + private Button btnSpeichern; + + private Button btnAbbrechen; + /** * Sets the configuration manipulator * @@ -282,6 +290,8 @@ public class ConfigurationComposite extends StateComposite { this.configurationContainer.setSignatureNote( this.configProvider.getSigantureNote()); + this.configurationContainer.setLocale(this.configProvider.getConfigLocale()); + this.configurationContainer.setBKUSelection(this.configProvider .getDefaultBKU()); try { @@ -392,6 +402,8 @@ public class ConfigurationComposite extends StateComposite { this.configManipulator.setDefaultSignaturePosition(null); } + this.configManipulator.setLocale(this.configurationContainer.getLocale()); + this.configManipulator .setPlaceholderTransparency(this.configurationContainer .getPlaceholderTransparency()); @@ -428,6 +440,7 @@ public class ConfigurationComposite extends StateComposite { // return false; } } while (redo); + return status; } @@ -460,4 +473,15 @@ public class ConfigurationComposite extends StateComposite { ((StateComposite) ctrl).doLayout(); } } + + /* (non-Javadoc) + * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources() + */ + @Override + public void reloadResources() { + this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$ + this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$ + this.btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$ + this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$ + } } |