import java.util.HashMap;
import java.util.Map;
import java.util.Vector;
+import java.util.logging.ConsoleHandler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
*/
public static void main(String[] args)
{
+// setLogging(); // BH - for event debugging in JavaScript
instance = new Jalview();
instance.doMain(args);
}
+ private static void logClass(String name)
+ {
+ // BH - for event debugging in JavaScript
+ ConsoleHandler consoleHandler = new ConsoleHandler();
+ consoleHandler.setLevel(Level.ALL);
+ Logger logger = Logger.getLogger(name);
+ logger.setLevel(Level.ALL);
+ logger.addHandler(consoleHandler);
+ }
+
+ @SuppressWarnings("unused")
+ private static void setLogging()
+ {
+ // BH - for event debugging in JavaScript (Java mode only)
+ if (!(/** @j2sNative true ||*/false))
+ {
+ Logger.getLogger("").setLevel(Level.ALL);
+ logClass("java.awt.EventDispatchThread");
+ logClass("java.awt.EventQueue");
+ logClass("java.awt.Component");
+ logClass("java.awt.focus.Component");
+ logClass("java.awt.focus.DefaultKeyboardFocusManager");
+ }
+
+ }
+
+
+
+
/**
* @param args
*/
if (!headless)
{
- desktop = new Desktop();
+ desktop = new Desktop()
+// {
+// // BH testing
+// @Override
+// protected void processEvent(AWTEvent e) {
+// System.out.println("Jalview.java " + e);
+// super.processEvent(e);
+// }
+// }
+ ;
desktop.setInBatchMode(true); // indicate we are starting up
desktop.setVisible(true);
{
AlignFrame af = null;
af = new AlignFrame(al, safeInt(view.getWidth()),
- safeInt(view.getHeight()), uniqueSeqSetId, viewId);
+ safeInt(view.getHeight()), uniqueSeqSetId, viewId)
+// {
+//
+// @Override
+// protected void processKeyEvent(java.awt.event.KeyEvent e) {
+// System.out.println("Jalview2XML AF " + e);
+// super.processKeyEvent(e);
+//
+// }
+//
+// }
+ ;
af.setFileName(file, FileFormat.Jalview);