import jalview.jbgui.GStructureViewer;
import jalview.structure.StructureSelectionManager;
import jalview.urls.IdOrgSettings;
+import jalview.util.BrowserLauncher;
import jalview.util.ImageMaker.TYPE;
import jalview.util.MessageManager;
import jalview.util.Platform;
* are spawned off as threads rather than waited for during this constructor.
*/
instance = this;
- doVamsasClientCheck();
+ if (!Jalview.isJS())
+ {
+ doVamsasClientCheck();
+ }
doConfigureStructurePrefs();
setTitle("Jalview " + jalview.bin.Cache.getProperty("VERSION"));
int yPos = Math.max(5, (screenSize.height - 650) / 2);
setBounds(xPos, yPos, 900, 650);
}
- /**
- * BH 2018
- *
- * @j2sNative
- */
- {
-
+
+ boolean doFullLoad = /** @j2sNative ! */true;
+
+ if (doFullLoad) {
+
jconsole = new Console(this, showjconsole);
// add essential build information
jconsole.setHeader("Jalview Version: "
});
- } // end BH 2018 ignore
+ }
this.setDropTarget(new java.awt.dnd.DropTarget(desktop, this));
public void checkForNews()
{
-
- /**
- * BH 2018
- *
- * @j2sNative
- */
+ final Desktop me = this;
+ // Thread off the news reader, in case there are connection problems.
+ addDialogThread(new Runnable()
{
- final Desktop me = this;
- // Thread off the news reader, in case there are connection problems.
- addDialogThread(new Runnable()
+ @Override
+ public void run()
{
- @Override
- public void run()
- {
- Cache.log.debug("Starting news thread.");
-
- jvnews = new BlogReader(me);
- showNews.setVisible(true);
- Cache.log.debug("Completed news thread.");
- }
- });
- }
+ Cache.log.debug("Starting news thread.");
+ jvnews = new BlogReader(me);
+ showNews.setVisible(true);
+ Cache.log.debug("Completed news thread.");
+ }
+ });
}
public void getIdentifiersOrgData()
void showNews(boolean visible)
{
- /**
- * BH 2018
- *
- * @j2sNative
- *
- */
+ Cache.log.debug((visible ? "Showing" : "Hiding") + " news.");
+ showNews.setSelected(visible);
+ if (visible && !jvnews.isVisible())
{
- Cache.log.debug((visible ? "Showing" : "Hiding") + " news.");
- showNews.setSelected(visible);
- if (visible && !jvnews.isVisible())
+ new Thread(new Runnable()
{
- new Thread(new Runnable()
+ @Override
+ public void run()
{
- @Override
- public void run()
- {
- long now = System.currentTimeMillis();
- Desktop.instance.setProgressBar(
- MessageManager.getString("status.refreshing_news"),
- now);
- jvnews.refreshNews();
- Desktop.instance.setProgressBar(null, now);
- jvnews.showNews();
- }
- }).start();
- }
+ long now = System.currentTimeMillis();
+ Desktop.instance.setProgressBar(
+ MessageManager.getString("status.refreshing_news"), now);
+ jvnews.refreshNews();
+ Desktop.instance.setProgressBar(null, now);
+ jvnews.showNews();
+ }
+ }).start();
}
}
private void doVamsasClientCheck()
{
- if (/** @j2sNative false && */ // BH 2018
- jalview.bin.Cache.vamsasJarsPresent())
+ if (Cache.vamsasJarsPresent())
{
setupVamsasDisconnectedGui();
VamsasMenu.setVisible(true);
frame.setIcon(false);
} catch (java.beans.PropertyVetoException ex)
{
-
+ // System.err.println(ex.toString());
}
}
});
}
/**
- * DOCUMENT ME!
- *
- * @param e
- * DOCUMENT ME!
+ * Action on requesting Help documentation
*/
@Override
- public void documentationMenuItem_actionPerformed(ActionEvent e)
+ public void documentationMenuItem_actionPerformed()
{
try
{
- Help.showHelpWindow();
+ if (Jalview.isJS())
+ {
+ BrowserLauncher.openURL("http://www.jalview.org/help.html");
+ }
+ else
+ {
+ Help.showHelpWindow();
+ }
} catch (Exception ex)
{
+ System.err.println("Error opening help: " + ex.getMessage());
}
}
}
/**
- * DOCUMENT ME!
- *
- * @param e
- * DOCUMENT ME!
+ * Prompts the user to choose a file and then saves the Jalview state as a
+ * Jalview project file
*/
@Override
- public void saveState_actionPerformed(ActionEvent e)
+ public void saveState_actionPerformed()
{
- // TODO: JAL-3048 not needed for Jalview-JS
-
JalviewFileChooser chooser = new JalviewFileChooser("jvp",
"Jalview Project");
}
/**
- * DOCUMENT ME!
- *
- * @param e
- * DOCUMENT ME!
+ * Prompts the user to choose a file and loads in as a Jalview project file
*/
@Override
- public void loadState_actionPerformed(ActionEvent e)
+ public void loadState_actionPerformed()
{
- // TODO: JAL-3048 not needed for Jalview-JS
-
JalviewFileChooser chooser = new JalviewFileChooser(
Cache.getProperty("LAST_DIRECTORY"), new String[]
{ "jvp", "jar" },
@Override
public void run()
{
- if (/** @j2sNative false && */ // BH 2018
- Cache.getDefault("CHECKURLLINKS", true))
+ if (Cache.getDefault("CHECKURLLINKS", true))
{
// check what the actual links are - if it's just the default don't
// bother with the warning