Splash Screen Client Swing [message #520926] |
Mon, 15 March 2010 15:33  |
Eclipse User |
|
|
|
People asking how to change the splash screen of Swing-Scout-Clients.
'DefaultSwingEnvironment.createIconUIResource("splash")' is called to
create the splash screen. The fist way to change the default splash is
to override this method in your Environment implementation. An other one
quite easier is to put a 'splash.(png|gif|jpg)' in the
'resources/icons/'f folder of your applications swing bundle (e.g.
org.eclipse.scout.sample.ui.swing).
Enjoy
andy
|
|
|
|
|
|
|
|
|
Re: Splash Screen Client Swing [message #991054 is a reply to message #990757] |
Mon, 17 December 2012 03:45   |
Eclipse User |
|
|
|
Beat,
Thanks for your response. I've tried this approach, however, I can't quite get it to work yet.
First of all, my swing client plugin's Activator does *not* have a getIcon() method. Its signature is
public class Activator implements BundleActivator{
and the only methods it has are start(), stop() and getDefault().
To work around this, I've tried modifying SwingEnvironment.createIconUIResource() as follows:
private IconUIResource createIconUIResource(String resourceSimpleName) {
Icon icon = org.eclipse.scout.rt.ui.swing.Activator.getIcon(resourceSimpleName);
if (icon != null) {
return new IconUIResource(icon);
}
else {
return null;
}
}
However, when running my client, I just get a grey rectangle instead of the splash screen and a line in the console saying:
!MESSAGE org.eclipse.scout.rt.ui.swing.SwingIconLocator.warnImageNotFound(SwingIconLocator.java:141) could not find image 'Splash'
So, for some reason, my splash screen image cannot be found (despite there being a Splash.png file in *.ui.swing/resources/icons).
Do I need something else to allow the icon resolution? Or is my attempt at directly accessing the org.eclipse.scout.rt.ui.swing.Activator what is causing this problem?
I'd appreciate any hints on where I go wrong.
|
|
|
|
|
|
Re: Splash Screen Client Swing [message #991160 is a reply to message #991141] |
Mon, 17 December 2012 10:18  |
Eclipse User |
|
|
|
Matthias
Thanks for clarifying. I had misunderstood you and thought that with the default value for splashPath it would look in the root, but that changing the value in the ini file would allow other locations. As to why 1b didn't work, I'll have another look, though I am pretty sure that I had consistently used the form "Splash" (with capital S) both in code and naming the file. I'll retry with a lower case s to check if this makes a difference.
Thanks for the pointer to "Splash.versionLocation" and UIDefaultsInjector for more variables.
|
|
|
Powered by
FUDForum. Page generated in 0.10248 seconds