X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FSplashScreen.java;h=98b24d1737575c8a6766c343416852c02d4f705d;hb=87256ba36fb105a1115067ffe2563412e9281d2d;hp=6bb96c092bfa01eb1bd1ec3e5a9b2ebf96bf69d3;hpb=91dd5d379e0624f6cd4be02c17187ec1a630d693;p=jalview.git
diff --git a/src/jalview/gui/SplashScreen.java b/src/jalview/gui/SplashScreen.java
index 6bb96c0..98b24d1 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();
@@ -98,7 +97,7 @@ public class SplashScreen extends JPanel
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
authlist = new JTextPane();
@@ -161,7 +160,7 @@ public class SplashScreen extends JPanel
System.err.println("Error when loading images!");
}
} while (!mt.checkAll());
- Desktop.instance.setIconImage(logo);
+ Desktop.getInstance().setIconImage(logo);
}
} catch (Exception ex)
{
@@ -173,10 +172,15 @@ 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
+ * @j2sIgnore
*/
{
((JTextPane) authlist).setEditable(false);
@@ -187,7 +191,7 @@ public class SplashScreen extends JPanel
}
add(authlist, BorderLayout.CENTER);
authlist.addMouseListener(closer);
- Desktop.desktop.add(iframe);
+ Desktop.getDesktopPane().add(iframe);
refreshText();
}
@@ -199,14 +203,13 @@ public class SplashScreen extends JPanel
@SuppressWarnings("unused")
protected boolean refreshText()
{
- String newtext = Desktop.instance.getAboutMessage(true).toString();
+ String newtext = Desktop.getInstance().getAboutMessage(true).toString();
// System.err.println("Text found: \n"+newtext+"\nEnd of newtext.");
if (oldtext != newtext.length())
{
iframe.setVisible(false);
oldtext = newtext.length();
if (Platform.isJS()) // BH 2019
- // if (/** @j2sNative true || */ false)
{
authlist = new JLabel(
"
"
@@ -215,19 +218,17 @@ public class SplashScreen extends JPanel
((JLabel) authlist).setBackground(Color.white);
}
else
+ /**
+ * Java only
+ *
+ * @j2sIgnore
+ */
{
- /**
- * 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);
@@ -235,8 +236,8 @@ public class SplashScreen extends JPanel
authlist.setSize(new Dimension(750, 375));
add(authlist, BorderLayout.CENTER);
revalidate();
- iframe.setBounds((Desktop.instance.getWidth() - 750) / 2,
- (Desktop.instance.getHeight() - 375) / 2, 750,
+ iframe.setBounds((Desktop.getInstance().getWidth() - 750) / 2,
+ (Desktop.getInstance().getHeight() - 375) / 2, 750,
authlist.getHeight() + iconimg.getHeight());
iframe.validate();
iframe.setVisible(true);
@@ -286,7 +287,7 @@ public class SplashScreen extends JPanel
}
closeSplash();
- Desktop.instance.startDialogQueue();
+ Desktop.getInstance().startDialogQueue();
}
/**