-
Book Overview & Buying
-
Table Of Contents
Mastering Eclipse Plug-in Development
By :
The E4 Eclipse application uses events internally to manage the state of the user interface. The decoupling allows the user interface mechanisms to be separated from the user interface renderer, which allows different user interfaces to be presented (such as JavaFX).
There is an E4-specific wrapper for the EventAdmin service called the IEventBroker. This provides a simple mechanism to post or send objects to a particular topic, as well as frontends to register event listeners. It has specific ties to E4 and is present in the UI package. Create a plug-in named com.packtpub.e4.advanced.event.e4.
To write portable code that processes events headlessly, consider using EventAdmin directly.
The IEventBroker can be injected into an E4 component using standard injection techniques, and from that, events can be posted synchronously or asynchronously. Create a class named E4Sender in the com.packtpub.e4.advanced.event.e4 plugin.
Obtaining the service in E4 is done...
Change the font size
Change margin width
Change background colour