Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Background image on main shell
Background image on main shell [message #992105] Thu, 20 December 2012 22:07 Go to next message
Joel Becker is currently offline Joel Becker
Messages: 14
Registered: December 2012
Junior Member
Hi,

I want to draw an image on the main Shell of my e4 application, resizing it in proportion to the current size of the Shell. In e4, how do I listen for the creation of the main Shell, so that I can add a resize listener? Maybe I need to listen for the creation of the Workbench, but I can't figure out how to do that either.
Re: Background image on main shell [message #992278 is a reply to message #992105] Fri, 21 December 2012 09:05 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

You can do those things by listening to the event broker. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java has all sorts of event types and also a size handler. Look in the method annotated with @PostConstruct.
Re: Background image on main shell [message #992483 is a reply to message #992278] Fri, 21 December 2012 19:04 Go to previous message
Joel Becker is currently offline Joel Becker
Messages: 14
Registered: December 2012
Junior Member
thanks for your reply. How do I get the IEventBroker instance at app start-up? I tried to inject it in my plugin's activator, but apparently the framework does not inject into Activators:

@Inject
private IEventBroker eventBroker;


eventBroker was null when start() was called.

[Updated on: Wed, 02 January 2013 19:31]

Report message to a moderator

Previous Topic:Eclipse contexts & Gemini blueprint
Next Topic:Question about @EventTopic annotations
Goto Forum:
  


Current Time: Thu Oct 23 01:52:20 GMT 2014

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

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