diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:15:04 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:15:04 +0000 |
commit | 620b7500e3e590d6ad67425aece586103f329d70 (patch) | |
tree | f1f528113de4bc626d6b94804c3c74ac2c4ede47 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow | |
parent | d8f1e6183bf5af499bf733033be7b5a2dd997a7e (diff) | |
download | mocca-620b7500e3e590d6ad67425aece586103f329d70.tar.gz mocca-620b7500e3e590d6ad67425aece586103f329d70.tar.bz2 mocca-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/workflow')
5 files changed, 58 insertions, 0 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigurationContainer.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigurationContainer.java index 0c4e1065..9d4d2ccc 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigurationContainer.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigurationContainer.java @@ -15,6 +15,8 @@ */ package at.asit.pdfover.gui.workflow; +import java.util.Locale; + import at.asit.pdfover.gui.exceptions.InvalidEmblemFile; import at.asit.pdfover.gui.exceptions.InvalidNumberException; import at.asit.pdfover.gui.exceptions.InvalidPortException; @@ -141,4 +143,16 @@ public interface ConfigurationContainer { * @param folder the default output folder */ public void setOutputFolder(String folder); + + /** + * Sets the locale + * @param locale the locale + */ + public void setLocale(Locale locale); + + /** + * Gets the locale + * @return the locale + */ + public Locale getLocale(); } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigurationContainerImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigurationContainerImpl.java index 2cf03444..b5565963 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigurationContainerImpl.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigurationContainerImpl.java @@ -18,6 +18,7 @@ package at.asit.pdfover.gui.workflow; // Imports import java.io.File; import java.io.FileNotFoundException; +import java.util.Locale; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.ImageData; @@ -69,6 +70,11 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { protected int proxyPort = -1; /** + * Holds the locale + */ + protected Locale locale = null; + + /** * Holds the output folder */ protected String folder = null; @@ -279,5 +285,23 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { public void setSignatureNote(String note) { this.signatureNote = note; } + + + /* (non-Javadoc) + * @see at.asit.pdfover.gui.workflow.ConfigurationContainer#setLocale(java.util.Locale) + */ + @Override + public void setLocale(Locale locale) { + this.locale = locale; + } + + + /* (non-Javadoc) + * @see at.asit.pdfover.gui.workflow.ConfigurationContainer#getLocale() + */ + @Override + public Locale getLocale() { + return this.locale; + } } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java index 39aab13d..f18b4ef1 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java @@ -45,4 +45,9 @@ public interface GUIProvider { * @return the main window shell */ public Shell getMainShell(); + + /** + * Reloads the resources on active gui components + */ + public void reloadResources(); } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java index 8ef85bd1..2575fd91 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java @@ -352,4 +352,12 @@ public class StateMachineImpl implements StateMachine, GUIProvider { return this.shell; } + + /* (non-Javadoc) + * @see at.asit.pdfover.gui.workflow.GUIProvider#reloadResources() + */ + @Override + public void reloadResources() { + this.mainWindow.reloadLocalization(); + } } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/ConfigurationUIState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/ConfigurationUIState.java index d8ddc403..57a7aa9b 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/ConfigurationUIState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/ConfigurationUIState.java @@ -73,6 +73,7 @@ public class ConfigurationUIState extends State { if(config.isUserDone()) { + this.reloadResources(); this.setNextState(status.getPreviousState()); } } @@ -98,4 +99,10 @@ public class ConfigurationUIState extends State { behavior.setMainBarVisible(false); } + /** + * Triggers to reload the resources + */ + public void reloadResources() { + this.stateMachine.getGUIProvider().reloadResources(); + } } |