diff --git a/src/graphics/splash/README.md b/src/graphics/splash/README.md deleted file mode 100644 index 242437604d2..00000000000 --- a/src/graphics/splash/README.md +++ /dev/null @@ -1,5 +0,0 @@ -Release file: splash-release.svg, uses splashBackground.png -Beta files: *beta*, base: splash-release.svg -Dev file: splash-dev.svg, base:splash-release.svg - -The target is splash.png contained in /src/main/resources/images/ diff --git a/src/graphics/splash/splash-beta.svg b/src/graphics/splash/splash-beta.svg deleted file mode 100644 index ae784cb3d75..00000000000 --- a/src/graphics/splash/splash-beta.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - beta 2 - diff --git a/src/graphics/splash/splash-beta2.svg b/src/graphics/splash/splash-beta2.svg deleted file mode 100644 index ae784cb3d75..00000000000 --- a/src/graphics/splash/splash-beta2.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - beta 2 - diff --git a/src/graphics/splash/splash-beta3.svg b/src/graphics/splash/splash-beta3.svg deleted file mode 100644 index 21da7ae117f..00000000000 --- a/src/graphics/splash/splash-beta3.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - beta 3 - diff --git a/src/graphics/splash/splash-dev.svg b/src/graphics/splash/splash-dev.svg deleted file mode 100644 index e5aafdbd177..00000000000 --- a/src/graphics/splash/splash-dev.svg +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - dev - This is adevelopment version.Features maynot work as expected. - - diff --git a/src/graphics/splash/splash-release.svg b/src/graphics/splash/splash-release.svg deleted file mode 100644 index 7e25023d773..00000000000 --- a/src/graphics/splash/splash-release.svg +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - This program is distributed under the terms of the General Public License.Copyright (2003-2015) Morten O. Alver, Nizar Batada, Oliver Kopp and all contributors. - JabRef reference manager - - - - - 2.80 - - diff --git a/src/graphics/splash/splashBackground.png b/src/graphics/splash/splashBackground.png deleted file mode 100644 index d5a048ef4e8..00000000000 Binary files a/src/graphics/splash/splashBackground.png and /dev/null differ diff --git a/src/main/java/net/sf/jabref/JabRef.java b/src/main/java/net/sf/jabref/JabRef.java index d6815e8b371..09459a3fe10 100644 --- a/src/main/java/net/sf/jabref/JabRef.java +++ b/src/main/java/net/sf/jabref/JabRef.java @@ -47,7 +47,6 @@ import net.sf.jabref.logic.remote.RemotePreferences; import net.sf.jabref.logic.remote.client.RemoteListenerClient; import net.sf.jabref.gui.remote.JabRefMessageHandler; -import net.sf.jabref.gui.splash.SplashScreenLifecycle; import net.sf.jabref.logic.util.FileBasedLock; import net.sf.jabref.logic.util.StringUtil; import net.sf.jabref.util.Util; @@ -71,9 +70,7 @@ public class JabRef { private static final Log LOGGER = LogFactory.getLog(JabRef.class); - private boolean graphicFailure = false; private JabRefCLI cli; - private SplashScreenLifecycle splashScreen = new SplashScreenLifecycle(); public void start(String[] args) { JabRefPreferences prefs = JabRefPreferences.getInstance(); @@ -175,7 +172,7 @@ public void start(String[] args) { Vector loaded = processArguments(args, true); - if (loaded == null || graphicFailure || cli.isDisableGui() || cli.isShowVersion()) { + if (loaded == null || cli.isDisableGui() || cli.isShowVersion()) { JabRefExecutorService.INSTANCE.shutdownEverything(); return; } @@ -254,20 +251,6 @@ public Vector processArguments(String[] args, boolean initialStart boolean commandMode = cli.isDisableGui() || cli.isFetcherEngine(); - // First we quickly scan the command line parameters for any that signal - // that the GUI - // should not be opened. This is used to decide whether we should show the - // splash screen or not. - if (initialStartup && !commandMode && !cli.isDisableSplash()) { - try { - splashScreen.show(); - } catch (Throwable ex) { - graphicFailure = true; - System.err.println(Globals.lang("Unable to create graphical interface") - + "."); - } - } - // Check if we should reset all preferences to default values: if (cli.isPreferencesReset()) { String value = cli.getPreferencesReset(); @@ -797,8 +780,6 @@ else if (!pr.isPostponedAutosaveFound()) { JabRef.jrf, 0, "")); } - splashScreen.hide(); - /*JOptionPane.showMessageDialog(null, Globals.lang("Please note that this " +"is an early beta version. Do not use it without backing up your files!"), Globals.lang("Beta version"), JOptionPane.WARNING_MESSAGE);*/ diff --git a/src/main/java/net/sf/jabref/JabRefCLI.java b/src/main/java/net/sf/jabref/JabRefCLI.java index 7e57a9e75df..de564966c7b 100644 --- a/src/main/java/net/sf/jabref/JabRefCLI.java +++ b/src/main/java/net/sf/jabref/JabRefCLI.java @@ -17,10 +17,6 @@ public boolean isShowVersion() { return cl.hasOption("version"); } - public boolean isDisableSplash() { - return cl.hasOption("nosplash"); - } - public boolean isBlank() { return cl.hasOption("blank"); } @@ -126,7 +122,6 @@ private Options getOptions() { // boolean options options.addOption("v", "version", false, Globals.lang("Display version")); options.addOption("n", "nogui", false, Globals.lang("No GUI. Only process command line options.")); - options.addOption("s", "nosplash", false, Globals.lang("Do not show splash window at startup")); options.addOption("h", "help", false, Globals.lang("Display help on command line options")); options.addOption("l", "loads", false, Globals.lang("Load session")); options.addOption("b", "blank", false, Globals.lang("Do not open any files at startup")); diff --git a/src/main/java/net/sf/jabref/gui/splash/SplashScreen.java b/src/main/java/net/sf/jabref/gui/splash/SplashScreen.java deleted file mode 100644 index 75c91f2b10d..00000000000 --- a/src/main/java/net/sf/jabref/gui/splash/SplashScreen.java +++ /dev/null @@ -1,139 +0,0 @@ -/* Copyright (C) 2003-2011 JabRef contributors. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -package net.sf.jabref.gui.splash; - -//import javax.swing.*; -import java.awt.EventQueue; -import java.awt.Frame; -import java.awt.Graphics; -import java.awt.Image; -import java.awt.MediaTracker; -import java.awt.Toolkit; -import java.awt.Window; -import java.net.URL; - -/** - *

Title:

- *

Description:

- *

Copyright: Copyright (c) 2003

- *

Company:

- * @author not attributable - * @version 1.0 - */ - -class SplashScreen extends Window { - - private final Image splashImage; - private boolean paintCalled = false; - - - private SplashScreen(Frame owner) { - super(owner); - URL imageURL = SplashScreen.class.getResource("/images/splash.png"); - splashImage = Toolkit.getDefaultToolkit().createImage(imageURL); - - // Load the image - MediaTracker mt = new MediaTracker(this); - mt.addImage(splashImage, 0); - try { - mt.waitForID(0); - } catch (InterruptedException ignored) { - } - - // Center the window on the screen. - int imgWidth = splashImage.getWidth(this); - int imgHeight = splashImage.getHeight(this); - - setSize(imgWidth, imgHeight); - setLocationRelativeTo(null); - - /* Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize(); - setLocation( - (screenDim.width - imgWidth) / 2, - (screenDim.height - imgHeight) / 2 - ); - */ - - } - - /** - * Updates the display area of the window. - */ - @Override - public void update(Graphics g) { - // Note: Since the paint method is going to draw an - // image that covers the complete area of the component we - // do not fill the component with its background color - // here. This avoids flickering. - - g.setColor(getForeground()); - paint(g); - } - - /** - * Paints the image on the window. - */ - - @Override - public void paint(Graphics g) { - g.drawImage(splashImage, 0, 0, this); - - // Notify method splash that the window - // has been painted. - if (!paintCalled) { - paintCalled = true; - synchronized (this) { - notifyAll(); - } - } - } - - /** - * Constructs and displays a SplashWindow.

- * This method is useful for startup splashs. - * Dispose the returned frame to get rid of the splash window.

- * - * @return Returns the frame that owns the SplashWindow. - */ - - public static Frame splash() { - Frame f = new Frame(); - SplashScreen w = new SplashScreen(f); - - // Show the window. - w.setVisible(true); - w.toFront(); - - // Note: To make sure the user gets a chance to see the - // splash window we wait until its paint method has been - // called at least once by the AWT event dispatcher thread. - - // sebwills adds: However, just in case the paint method never gets called - // (e.g. if the splashscreen is completely obscured by an 'always on top' - // window of some other application), we time-out after 5 seconds. - if (!EventQueue.isDispatchThread()) { - synchronized (w) { - if (!w.paintCalled) { - try { - w.wait(5000); - } catch (InterruptedException ignored) { - } - } - } - } - return f; - } -} diff --git a/src/main/java/net/sf/jabref/gui/splash/SplashScreenLifecycle.java b/src/main/java/net/sf/jabref/gui/splash/SplashScreenLifecycle.java deleted file mode 100644 index 96b5eedcb28..00000000000 --- a/src/main/java/net/sf/jabref/gui/splash/SplashScreenLifecycle.java +++ /dev/null @@ -1,19 +0,0 @@ -package net.sf.jabref.gui.splash; - -import java.awt.Frame; - -public class SplashScreenLifecycle { - - private Frame splashScreen; - - public void show() { - splashScreen = SplashScreen.splash(); - } - - public void hide() { - if (splashScreen != null) { - splashScreen.dispose(); - splashScreen = null; - } - } -} diff --git a/src/main/resources/images/splash.png b/src/main/resources/images/splash.png deleted file mode 100644 index 8df18f2c849..00000000000 Binary files a/src/main/resources/images/splash.png and /dev/null differ