*/
package jalview.bin;
+import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
+import jalview.io.BioJsHTMLOutput;
+import jalview.io.HtmlSvgOutput;
+import jalview.util.MessageManager;
+import jalview.util.Platform;
+import jalview.ws.jws2.Jws2Discoverer;
+
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
-import jalview.gui.AlignFrame;
-import jalview.gui.Desktop;
-import jalview.io.HtmlSvgOutput;
-import jalview.util.MessageManager;
-import jalview.util.Platform;
-import jalview.ws.jws2.Jws2Discoverer;
-
/**
* Main class for Jalview Application <br>
* <br>
System.out.println(System.getProperty("os.arch") + " "
+ System.getProperty("os.name") + " "
+ System.getProperty("os.version"));
- // if (new Platform().isAMac())
- // {
- // // System.setProperty("com.apple.mrj.application.apple.menu.about.name",
- // // "Jalview");
- // // System.setProperty("apple.laf.useScreenMenuBar", "true");
- // try
- // {
- // UIManager.setLookAndFeel(ch.randelshofer.quaqua.QuaquaManager
- // .getLookAndFeel());
- // System.out
- // .println("--------------------------------------------> in here");
- // } catch (UnsupportedLookAndFeelException e)
- // {
- // // TODO Auto-generated catch block
- // e.printStackTrace();
- // }
- // }
ArgsParser aparser = new ArgsParser(args);
boolean headless = false;
desktop.checkForNews();
}
+ if (!isHeadlessMode())
+ {
+ BioJsHTMLOutput.updateBioJS();
+ }
+
String file = null, protocol = null, format = null, data = null;
- jalview.io.FileLoader fileLoader = new jalview.io.FileLoader();
+ jalview.io.FileLoader fileLoader = new jalview.io.FileLoader(!headless);
Vector getFeatures = null; // vector of das source nicknames to fetch
// features from
// loading is done.
}
else if (format.equalsIgnoreCase("eps"))
{
- System.out.println("Creating EPS file: " + file);
- af.createEPS(new java.io.File(file));
+ File outputFile = new java.io.File(file);
+ System.out.println("Creating EPS file: "
+ + outputFile.getAbsolutePath());
+ af.createEPS(outputFile);
continue;
}
}
return ff;
}
+
+ public static boolean isHeadlessMode()
+ {
+ String isheadless = System.getProperty("java.awt.headless");
+ if (isheadless != null && isheadless.equalsIgnoreCase("true"))
+ {
+ return true;
+ }
+ return false;
+ }
}
/**
return queued == 0 && running == 0;
}
-};
+}