previous | TOC | next
UI Service Documentation
Create and add configuration forms
A bundle could have its own specific configurations that should be configured by the user. Through the UIService each bundle is able to provide its own configuration forms in the UI. When added in the UI a configuration form could be accessed from the user through a menu, a toolbar, etc. Its upon the UIService implementation to define where the external configuration forms will appear in the application.
If you want to implement the UIService: Implement the ConfigurationManager interface to provide a mechanism for adding and removing configuration forms in the GUI.
How to create and add a configuration form
It’s as easy as 1-2-3 :)
- Firstly you should implement the ConfigurationForm interface.
You have only three methods here:
* getTitle - should return the title of your configuration
* getIcon - should return an icon, which will serve as an icon for the component (e.g. a button) through which the user will access your configuration form
* getForm - the form itself; should be an UI component compatible with the UI library used in the current UI implementation, where your configuration form will be added
- When finished with your configuration form you should add it to the UI.
It is the UI ConfigurationManager, which is charged to add and remove configuration forms from the UI. To obtain the current ConfigurationManager invoke the getConfigurationManager method of the UIService.
You could now add your configuration form by invoking the
addConfigurationForm(ConfigurationForm configForm) method over the obtained above
ConfigurationManager.
Once added in the ConfigurationManager your configuration form will be added to the UI.
previous | TOC | next