this.interactiveDialog = interactive;
// show a splashscreen that will disapper
if (Platform.isJS()) // BH 2019
- // if (/** @j2sNative true || */ false)
{
authlist = new JLabel("");
run();
/**
* Java only
*
- * @j2sNative
+ * @j2sIgnore
*/
{
authlist = new JTextPane();
System.err.println("Error when loading images!");
}
} while (!mt.checkAll());
- Desktop.instance.setIconImage(logo);
+ Desktop.getInstance().setIconImage(logo);
}
} catch (Exception ex)
{
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);
}
add(authlist, BorderLayout.CENTER);
authlist.addMouseListener(closer);
- Desktop.desktop.add(iframe);
+ Desktop.getDesktopPane().add(iframe);
refreshText();
}
@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(
"<html><br/><br/><img src=\"swingjs/j2s/images/Jalview_Logo.png\"/><br/>"
((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);
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);
}
closeSplash();
- Desktop.instance.startDialogQueue();
+ Desktop.getInstance().startDialogQueue();
}
/**