JAL-3289 implemented CHANNEL=LOCAL,RELEASE,TEST-RELEASE,SCRATCHH-...,DEVELOP,ARCHIVE...
[jalview.git] / getdown / src / getdown / launcher / src / main / java / com / threerings / getdown / launcher / GetdownApp.java
index eaf9f2e..9b83b81 100644 (file)
@@ -7,7 +7,6 @@ package com.threerings.getdown.launcher;
 
 import java.awt.Color;
 import java.awt.Container;
-import java.awt.EventQueue;
 import java.awt.Image;
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
@@ -92,7 +91,7 @@ public class GetdownApp
     }
     if (abort) System.exit(-1);
 
-    log.info("Starting....");
+    log.info("Starting ...");
     try
     {
       jalview.bin.StartupNotificationListener.setListener();
@@ -132,6 +131,26 @@ public class GetdownApp
               handleWindowClose();
             }
           });
+          
+          // keep_on_top
+          try {
+                 readConfig(false);
+          } catch (Exception e) {
+                 log.warning("Error reading config for keep_on_top");
+          }
+          // move window to top, always on top
+          if (_ifc.keepOnTop) {
+                 log.info("Keep on top set to ", "keep_on_top", _ifc.keepOnTop);
+                         EQinvoke(new Runnable() {
+                                       @Override
+                                       public void run() {
+                                               _frame.toFront();
+                                               _frame.repaint();
+                                       }
+                               });
+                         _frame.setAlwaysOnTop(true);
+          }
+
           // handle close on ESC
           String cancelId = "Cancel"; // $NON-NLS-1$
           _frame.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
@@ -244,7 +263,7 @@ public class GetdownApp
         super.fail(message);
         // super.fail causes the UI to be created (if needed) on the next UI tick, so we
         // want to wait until that happens before we attempt to redecorate the window
-        EventQueue.invokeLater(new Runnable() {
+        EQinvoke(new Runnable() {
           @Override
           public void run() {
             // if the frame was set to be undecorated, make window decoration available