Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Show dialog on startup in JFace application
Show dialog on startup in JFace application [message #1725673] Sun, 06 March 2016 15:36
Kay Schröer is currently offline Kay SchröerFriend
Messages: 2
Registered: April 2014
Junior Member
I need some help to find the right place to load my configuration file.
I have a JFace application and want to have the GUI in different languages. For that I have a flag in a config file. Dependding on this flag I later load the ResourceBundle.
Now I have the problem that I'm adding a SWT.Show listener to the shell and then load the config file. But this doesn't work because the createContents() method of the ApplicationWindow is called before the show event triggers so all controls will appear in the default language.
Then I thought to move the config loading process to the createContents() method but there's another point to consider: The user should be able to load config files from several locations. So I also built a selection dialog in which the user can choose the right file and this window has to be opened directly on startup.

So my workflow is now as follows:
Immediately after starting the program, the selection dialog has to popup. In this dialog the user can choose the right config file. If the user clicked the ok button then the main window is opened and the GUI controls should get my internationalized labels. But if the user clicked the cancel button then the program should be exited.
So far so well, but I have some problems to find the right way to realize this workflow or rather which method is the best one to place the code?
Previous Topic:No Text Wrap support in Table cell
Next Topic:ViewPart tab edge (square vs soft)
Goto Forum:
  


Current Time: Sat Apr 27 00:27:19 GMT 2024

Powered by FUDForum. Page generated in 0.02324 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top