Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to redirect to browser URL on splash image click?

I use PDE. My tool has a splash image located in splash.bmp. In the build.properties I include the image into bin.includes (bin.includes = splash.bmp). In the app.product file I have the following code:

   <splash startupProgressRect="5,275,445,15" />
   <launcher name="app">
      <linux icon="/icons/running.xpm"/>
      <win useIco="false">
         <bmp/>
      </win>
   </launcher>

My question is the following: Is it possible to add links in the splash image? I mean, once the app is loading, it possible to click on specific section in the splash and it will open the browser with a link?

Using Java8 and Eclipse Photon if that matters. Is it even possible? Maybe a hint?

like image 282
vesii Avatar asked Nov 07 '22 03:11

vesii


1 Answers

I think what you are looking for is a custom splash handler:

The native launcher of Eclipse creates the window for the splash screen and draws the configured bitmap on it. Any additional functionality (e.g. the progress bar) is implemented in Java. Since Eclipse 3.3. this implementation can be customized through the extension point org.eclipse.ui.splashHandler.

The default implementation is org.eclipse.ui.internal.splash.EclipseSplashHandler (source). You can either extend your custom implementation from this or any sub class of it or you can implement your own custom handler from scratch.

The init method of your custom handler implementation is called with a Shell that represents the splash window. You can easily add additional controls to the splash screen, including a Hyperlink control or a Label with a mouse listener.

Latest Eclipse PDE (not tested with Photon) can even generate an interactive splash example. Double click on the MAINFEST.MF of your main UI plugin -> Extensions -> Add.. -> select org.eclipse.ui.splashHandler -> Select Splash Handler template at the bottom -> Next -> Select Interactive - A simulated log-in session -> ensure that Add a default splash screen to this plug-in is checked.

like image 151
rmunge Avatar answered Nov 12 '22 17:11

rmunge