patch for JAL-792
authorjprocter <Jim Procter>
Sun, 27 Feb 2011 18:35:28 +0000 (18:35 +0000)
committerjprocter <Jim Procter>
Sun, 27 Feb 2011 18:35:28 +0000 (18:35 +0000)
src/jalview/appletgui/Finder.java

index 2993fdb..3a445a9 100755 (executable)
@@ -166,25 +166,30 @@ public class Finder extends Panel implements ActionListener
       ap.alignFrame.statusBar.setText("Finished searching.");
       resIndex = -1;
       seqIndex = 0;
-    }
-    if (findAll)
-    {
-      String message = (idMatch.size() > 0) ? "" + idMatch.size() + " IDs"
-              : "";
-      if (idMatch.size() > 0 && searchResults != null
-              && searchResults.getSize() > 0)
+    } else { 
+      if (findAll)
       {
-        message += " and ";
+        String message = (idMatch.size() > 0) ? "" + idMatch.size()
+                + " IDs" : "";
+        if (idMatch.size() > 0 && searchResults != null
+                && searchResults.getSize() > 0)
+        {
+          message += " and ";
+        }
+        if (searchResults != null)
+        {
+          message += searchResults.getSize() + " subsequence matches.";
+        }
+        ap.alignFrame.statusBar.setText("Search results: " + searchString
+                + " : " + message);
+
       }
-      if (searchResults != null)
+      else
       {
-        message += searchResults.getSize() + " subsequence matches.";
+        // TODO: indicate sequence and matching position in status bar
+        ap.alignFrame.statusBar.setText("Found match for " + searchString);
       }
-      ap.alignFrame.statusBar.setText("Search results: " + searchString
-              + " : " + message);
-
     }
-
   }
 
   Label jLabel1 = new Label();