/* * Copyright (c) 2012 European Synchrotron Radiation Facility, * Diamond Light Source Ltd. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ package fable.imageviewer.rcp; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.splash.AbstractSplashHandler; import fable.framework.toolbox.SplashScreen; /** * @since 3.3 * */ public class SplashHandler extends AbstractSplashHandler { /** * */ public SplashHandler() { } /* * (non-Javadoc) * * @see * org.eclipse.ui.splash.AbstractSplashHandler#init(org.eclipse.swt.widgets * .Shell) */ public void init(final Shell splash) { // Store the shell super.init(splash); FillLayout layout = new FillLayout(); getSplash().setLayout(layout); // Force shell to inherit the splash background getSplash().setBackgroundMode(SWT.INHERIT_DEFAULT); // Add version number to splash screen SplashScreen.SplashAddVersion(splash, Activator.PLUGIN_ID); // Force the splash screen to layout splash.layout(true); } }