Description
The main ECTR UI consists of several separate windows called "context".
There are several default contexts like "Desktop", "Object Browser" and "Assembly":
It is possible to implement custom contexts using the OSGi extension service PluginContext.
Background
The "binding" part of the context extension is really simple - the service implementation has to provide a container (java.awt.Container) containing the custom Swing UI.
ECTR wraps this container into JDesktopPane as it does with all other contexts. Thereafter the context is available in ECTR UI. The biggest part of the work implementing a custom context window will go into the UI implementation inside the implementation.
The ECTR UI uses Java Swing as UI framework. Therefore, the third party implementations of the context window have to use Java Swing also. The mixing of UI frameworks has been known to cause problems or to not work at all.
Using JavaFX with ECTR is not going to work. ECTR is shipped with SAP JRE which - at least as of now (15.11.2017) - lacks support of JavaFX.
Please be aware of how Java Swing should interact with threads.
For this interaction, please heed the following two "golden" rules:
- Never do SAP calls or other potentially long running tasks inside an AWT Event Dispatcher Thread .
- Never access UI components outside an AWT Event Dispatcher Thread.
Otherwise the whole ECTR UI may be rendered unusable, not just the own custom context window.
See the Swing documentation for background information: https://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html
Related Services
PluginContext
Sequence
Example
Coming soon...