... putIfUndefined(defaults, "Splash.icon", getSplashUIResource()); ...
public void interceptUIDefaults(UIDefaults defaults) { super.interceptUIDefaults(defaults); defaults.put("Splash.icon", createIconUIResource("your_custom_splash")); } protected IconUIResource createIconUIResource(String resourceSimpleName) { Icon icon = Activator.getIcon(resourceSimpleName); if (icon != null) { return new IconUIResource(icon); } else { return null; } }
public class Activator implements BundleActivator{
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; } }
!MESSAGE org.eclipse.scout.rt.ui.swing.SwingIconLocator.warnImageNotFound(SwingIconLocator.java:141) could not find image 'Splash'
public class SwingEnvironment extends DefaultSwingEnvironment { private SwingIconLocator m_splashIconLocator; @Override public void interceptUIDefaults(UIDefaults defaults) { super.interceptUIDefaults(defaults); /* 'your_custom_splash' is the name of your image (e.g. your_custom_splash.png) */ defaults.put("Splash.icon", createIconUIResource("your_custom_splash")); } private SwingIconLocator getIconLocator() { if (m_splashIconLocator == null) { /* this is the activator of your swing bundle containing your splash image */ Bundle bundle = Platform.getBundle(Activator.PLUGIN_ID); BundleIconLocator iconLocator = new BundleIconLocator(bundle); /* this is the folder inside the bundle given above specifying where to search for the images */ iconLocator.getIconLocatorService().setFolderName("resources/splash"); m_splashIconLocator = new SwingIconLocator(iconLocator); } return m_splashIconLocator; } protected IconUIResource createIconUIResource(String resourceSimpleName) { Icon icon = getIconLocator().getIcon(resourceSimpleName); if (icon != null) { return new IconUIResource(icon); } else { return null; } } }
osgi.splashPath=platform\:/base/plugins/org.eclipse.minicrm.ui.swing/resources/icons
osgi.splashPath=platform\:/base/plugins/org.eclipse.minicrm.ui.swing
defaults.put("Splash.versionLocation", new Point(100, 100)); defaults.put("Splash.text", new ColorUIResource(0x000000));