X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FSplashScreen.java;h=f7d7cbf6a03cb90bad564b965c1caf3c22ba7f07;hb=8fa69554edf6aeb278b4a4afd8e2b60264fdccd8;hp=52bd64fd25eb72d6891b2a7114cd590a68b1b11e;hpb=d9f0a24d9662a0b530fd79b51108dd074d03d6e0;p=jalview.git diff --git a/src/jalview/gui/SplashScreen.java b/src/jalview/gui/SplashScreen.java index 52bd64f..f7d7cbf 100755 --- a/src/jalview/gui/SplashScreen.java +++ b/src/jalview/gui/SplashScreen.java @@ -88,7 +88,6 @@ public class SplashScreen extends JPanel this.interactiveDialog = interactive; // show a splashscreen that will disapper if (Platform.isJS()) // BH 2019 - // if (/** @j2sNative true || */ false) { authlist = new JLabel(""); run(); @@ -140,8 +139,7 @@ public class SplashScreen extends JPanel java.net.URL urllogo = getClass() .getResource("/images/Jalview_Logo_small.png"); - if (/** @j2sNative false || */ - url != null) + if (!Platform.isJS() && url != null) { image = java.awt.Toolkit.getDefaultToolkit().createImage(url); Image logo = java.awt.Toolkit.getDefaultToolkit() @@ -157,7 +155,6 @@ public class SplashScreen extends JPanel } catch (InterruptedException x) { } - ; if (mt.isErrorAny()) { System.err.println("Error when loading images!"); @@ -175,8 +172,13 @@ public class SplashScreen extends JPanel this.setLayout(new BorderLayout()); iframe.setContentPane(this); iframe.setLayer(JLayeredPane.PALETTE_LAYER); + if (Platform.isJS()) + { + // ignore in JavaScript + } + else /** - * we add image directly in html for javascript ? + * Java only * * @j2sNative */ @@ -208,7 +210,6 @@ public class SplashScreen extends JPanel iframe.setVisible(false); oldtext = newtext.length(); if (Platform.isJS()) // BH 2019 - // if (/** @j2sNative true || */ false) { authlist = new JLabel( "


" @@ -217,19 +218,17 @@ public class SplashScreen extends JPanel ((JLabel) authlist).setBackground(Color.white); } else + /** + * Java only + * + * @j2sNative + */ { - /** - * Java only - * - * @j2sNative - */ - { - authlist = new JTextPane(); - ((JTextPane) authlist).setEditable(false); - ((JTextPane) authlist).setContentType("text/html"); - ((JTextPane) authlist).setText(newtext); - ((JTextPane) authlist).addHyperlinkListener(this); - } + authlist = new JTextPane(); + ((JTextPane) authlist).setEditable(false); + ((JTextPane) authlist).setContentType("text/html"); + ((JTextPane) authlist).setText(newtext); + ((JTextPane) authlist).addHyperlinkListener(this); } authlist.addMouseListener(closer);