GsiApplicationBase
Description
GsiApplicationBase
is an extension of the existing
ApplicationBase class from CERN (accsoft-gui-fx). It's a basic JavaFx application that consists of a
MasterDetailPane with an upper/master pane where the main application content can be added, and a lower/detail area that can be expanded by a button click and that by default contains the application console and an overview of running
ApplicationTasks.
All GSI JavaFx applications should eventually use the
GsiApplicationBase, as it is a central place to provide application-wide new features, bugfixes etc.
API differences to ApplicationBase
- to customize the primary Stage, developers must override the method
GsiApplicationBase#initStage(Stage)
instead of ApplicationBase#startApplication(Stage)
. The latter method is now final.
Features
- provides support for placing the application on a specific fixed display screen in fullscreen mode via the RemoteLauncher
- provides support for two different kinds of apps:
CONSOLE
apps (the "normal" apps that run on the consoles in the MCR) and WALL
apps (that run in fullscreen on the fixed displays)
- for applications rolled out in /groups/fcc/applications/: provides notifications when a newer version of the application is found (→ helps user notice that he is running an outdated version of the app)
- uncaught exceptions are automatically logged (→ good for error analysis)
- simplifies loading of app-specific stylesheets
- automatically loads the common stylesheets. This may cause your app to "look a little bit different than before" when you start using the GsiApplicationBase instead of CERN's
ApplicationBase
(e.g. some font sizes or spacings might be different). If you need help, please contact the AP developers (preferrably Anne and Christian).
- automatically loads the default properties all applications should always load
- improves the formatting of the logger in the application console
This list will hopefully be extended in the near future.
Tips & Tricks
General tip: Please don't hesitate to ask AP developers if you need help using the
GsiApplicationBase
!
Overwriting default properties
With the property loading mechanism provided by AP, a property cannot be overwritten once it has been set. That means that the order in which property files are loaded influences which properties become effective (first loaded property wins). If developers wants to overwrite a default property (meaning a property that is usually set in the
default properties file), they should create a custom property file and load it in a static block defined in their class that extends
GsiApplicationBase.
--
AnnekeWalter - 26 Sep 2018