Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Interactive Splashscreen
Interactive Splashscreen [message #1779148] Wed, 03 January 2018 09:06 Go to next message
Selim Dincer is currently offline Selim DincerFriend
Messages: 13
Registered: November 2017
Junior Member
Hey,

Looking at the commits of this issue I saw that there have been some efforts to enable splashscreens. I have implemented our version of this splashscreen:

@Component(property = "service.ranking:Integer=1")
public class SplashScreen extends InteractiveStartupService implements StartupProgressTrackerService {
	@Override
	protected Scene createScene(ApplicationContext applicationContext, Image splashImage) {
		return new Scene(new Pane(new ImageView(splashImage)));
	}

	@Override
	public void stateReached(ProgressState state) {
		super.stateReached(state);
		if (state == DefaultProgressState.JAVAFX_INITIALIZED) {
			show();
		}
	}
}


However I've noticed that the UI Thread of the splashscreen seems to be blocked (thus it's not that interactive anymore). For example putting an indeterminate progress bar below the picture results in a progressbar that remains empty. Is there a way to bypass this blocking?

Also my first approach was to try the javafx.preloader property. However the fx workbench bundle had no access to our Preloader class eventhough it was included in exported packages. Changing the osgi.parentClassloader from ext to app did not help either.

So the final question is:
How to do splashscreens properly with efxclipse?

Thanks!

Selim

Re: Interactive Splashscreen [message #1791701 is a reply to message #1779148] Wed, 04 July 2018 11:21 Go to previous messageGo to next message
Selim Dincer is currently offline Selim DincerFriend
Messages: 13
Registered: November 2017
Junior Member
Hey,

I was curious if there are any news regarding this problem. Currently we show a swing based splash screen as a workaround but we would like to be able to use JavaFX so that it can be styled via css.

Thanks
Selim
Re: Interactive Splashscreen [message #1792402 is a reply to message #1791701] Tue, 17 July 2018 08:51 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
The problem is that the bootstrap process of the whole application happens on the UI-Thread (I and think that is also expected because you create an UI). There is a command line option -DcreateWorkbenchOnNonUIThread=true that does the boostrapping of the model in an extra thread but I'm uncertain this plays nice with the current "InteractiveStartupService" but you could at least give it a try.
Re: Interactive Splashscreen [message #1792403 is a reply to message #1792402] Tue, 17 July 2018 08:55 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
BTW: I've been thinking about another route to follow. What if we startup JavaFX before the whole OSGi-Framework launches. It would be as simple as not launching with java -jar plugins/org.eclipse.equinox.launcher.jar but a custom one. This way JavaFX is up as early as possible, on the other hand this would not work with the native splash stuff from the eclipse.exe.
Previous Topic:Launching e(fx)clipse
Next Topic:Current recommendations for dialogs (and wizards)
Goto Forum:
  


Current Time: Fri Apr 19 02:01:19 GMT 2024

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

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

Back to the top