import jalview.bin.Cache;
import jalview.io.*;
+import jalview.ws.params.ParamManager;
import java.awt.*;
import java.awt.datatransfer.*;
private class JalviewChangeSupport implements PropertyChangeListener
{
- @Override
public void propertyChange(PropertyChangeEvent evt)
{
// Handle change events - most are simply routed to other sources
return v_client;
}
+ /**
+ * flag set if jalview GUI is being operated programmatically
+ */
+ private boolean inBatchMode=false;
+
+ /**
+ * check if jalview GUI is being operated programmatically
+ * @return inBatchMode
+ */
+ public boolean isInBatchMode()
+ {
+ return inBatchMode;
+ }
+
+ /**
+ * set flag if jalview GUI is being operated programmatically
+ * @param inBatchMode
+ */
+ public void setInBatchMode(boolean inBatchMode)
+ {
+ this.inBatchMode = inBatchMode;
+ }
+
public void startServiceDiscovery()
{
}
}
+ /**
+ * start a thread to open a URL in the configured browser. Pops up a warning dialog to the user if there is an exception when calling out to the browser to open the URL.
+ * @param url
+ */
+ public static void showUrl(final String url)
+ {
+ new Thread(new Runnable() {
+ public void run() {
+ try {
+ jalview.util.BrowserLauncher.openURL(url);
+ } catch (Exception ex)
+ {
+ JOptionPane
+ .showInternalMessageDialog(
+ Desktop.desktop,
+ "Unixers: Couldn't find default web browser."
+ + "\nAdd the full path to your browser in Preferences.",
+ "Web browser not found", JOptionPane.WARNING_MESSAGE);
+
+ ex.printStackTrace();
+ }
+ }
+ }).start();
+ }
+
+ public static WsParamSetManager wsparamManager = null;
+ public static ParamManager getUserParameterStore()
+ {
+ if (wsparamManager==null)
+ {
+ wsparamManager = new WsParamSetManager();
+ }
+ return wsparamManager;
+ }
+
}