JAL-1517 source formatting
[jalview.git] / src / jalview / bin / JalviewLite.java
index 16f95cd..4e02984 100644 (file)
@@ -1482,36 +1482,44 @@ public class JalviewLite extends Applet implements
       callInitCallback();
     }
   }
+
   private void initLiveConnect()
   {
     // try really hard to get the liveConnect thing working
-    boolean notFailed=false;
-    int tries=0;
-    while (!notFailed && tries<10) {
-      if (tries>0)
+    boolean notFailed = false;
+    int tries = 0;
+    while (!notFailed && tries < 10)
+    {
+      if (tries > 0)
       {
         System.err.println("LiveConnect request thread going to sleep.");
       }
-      try {
-        Thread.sleep(700*(1+tries));
+      try
+      {
+        Thread.sleep(700 * (1 + tries));
+      } catch (InterruptedException q)
+      {
       }
-      catch (InterruptedException q) {};
-      if (tries++>0)
+      ;
+      if (tries++ > 0)
       {
         System.err.println("LiveConnect request thread woken up.");
       }
-      try {
+      try
+      {
         JSObject scriptObject = JSObject.getWindow(this);
-        if (scriptObject.eval("navigator")!=null)
+        if (scriptObject.eval("navigator") != null)
         {
-          notFailed=true;
+          notFailed = true;
         }
       } catch (JSException jsex)
       {
-        System.err.println("Attempt "+tries+" to access LiveConnect javascript failed.");
+        System.err.println("Attempt " + tries
+                + " to access LiveConnect javascript failed.");
       }
     }
   }
+
   private void callInitCallback()
   {
     String initjscallback = getParameter("oninit");
@@ -1530,7 +1538,7 @@ public class JalviewLite extends Applet implements
       {
       }
       ;
-      // try really hard to let the browser plugin know we want liveconnect 
+      // try really hard to let the browser plugin know we want liveconnect
       initLiveConnect();
 
       if (scriptObject != null)
@@ -1647,15 +1655,19 @@ public class JalviewLite extends Applet implements
       g.setColor(Color.cyan);
       g.fillRect(0, 0, getSize().width, getSize().height);
       g.setColor(Color.red);
-      g.drawString(MessageManager.getString("label.jalview_cannot_open_file"), 5, 15);
+      g.drawString(
+              MessageManager.getString("label.jalview_cannot_open_file"),
+              5, 15);
       g.drawString("\"" + file + "\"", 5, 30);
     }
     else if (embedded)
     {
       g.setColor(Color.black);
       g.setFont(new Font("Arial", Font.BOLD, 24));
-      g.drawString(MessageManager.getString("label.jalview_applet"), 50, getSize().height / 2 - 30);
-      g.drawString(MessageManager.getString("label.loading_data") + "...", 50, getSize().height / 2);
+      g.drawString(MessageManager.getString("label.jalview_applet"), 50,
+              getSize().height / 2 - 30);
+      g.drawString(MessageManager.getString("label.loading_data") + "...",
+              50, getSize().height / 2);
     }
   }
 
@@ -1862,10 +1874,14 @@ public class JalviewLite extends Applet implements
 
         if (protocol == jalview.io.AppletFormatAdapter.PASTE)
         {
-          newAlignFrame.setTitle(MessageManager.formatMessage("label.sequences_from", new String[]{applet.getDocumentBase().toString()}));
+          newAlignFrame.setTitle(MessageManager.formatMessage(
+                  "label.sequences_from", new String[]
+                  { applet.getDocumentBase().toString() }));
         }
 
-        newAlignFrame.statusBar.setText(MessageManager.formatMessage("label.successfully_loaded_file", new String []{file}));
+        newAlignFrame.statusBar.setText(MessageManager.formatMessage(
+                "label.successfully_loaded_file", new String[]
+                { file }));
 
         String treeFile = applet.getParameter("tree");
         if (treeFile == null)