Hidden representatives moved from sequence to viewport
[jalview.git] / src / jalview / gui / Finder.java
index e1431a9..0e340dc 100755 (executable)
@@ -61,22 +61,7 @@ public class Finder extends GFinder
       frame.setLayer(JLayeredPane.PALETTE_LAYER);\r
       Desktop.addInternalFrame(frame, "Find", 340, 110);\r
 \r
-\r
-        // all a big pain, but we need to wait until the frame is visible before the textfield can\r
-        // obtain the focus/////////////////////////\r
-        frame.addInternalFrameListener(new InternalFrameAdapter()\r
-            {\r
-                public void internalFrameOpened(InternalFrameEvent evt)\r
-                {\r
-                    SwingUtilities.invokeLater(new Runnable()\r
-                        {\r
-                            public void run()\r
-                            {\r
-                                textfield.requestFocus();\r
-                            }\r
-                        });\r
-                }\r
-            });\r
+      textfield.requestFocus();\r
     }\r
 \r
 \r
@@ -187,7 +172,7 @@ public class Finder extends GFinder
         {\r
             int res = Integer.parseInt(searchString);\r
             found = true;\r
-            if (av.getSelectionGroup() == null || av.getSelectionGroup().getSize(false) < 1)\r
+            if (av.getSelectionGroup() == null || av.getSelectionGroup().getSize() < 1)\r
             {\r
               seq = (Sequence) av.getAlignment().getSequenceAt(0);\r
             }\r
@@ -210,7 +195,7 @@ public class Finder extends GFinder
 \r
         if (selection != null)\r
         {\r
-            if ((selection.getSize(false) < 1) ||\r
+            if ((selection.getSize() < 1) ||\r
                     ((selection.getEndRes() - selection.getStartRes()) < 2))\r
             {\r
                 selection = null;\r
@@ -221,7 +206,7 @@ public class Finder extends GFinder
         {\r
             seq = (Sequence) av.alignment.getSequenceAt(seqIndex);\r
 \r
-            if ((selection != null) && !selection.getSequences(false).contains(seq))\r
+            if ((selection != null) && !selection.getSequences(null).contains(seq))\r
             {\r
                 seqIndex++;\r
                 resIndex = 0;\r
@@ -229,7 +214,7 @@ public class Finder extends GFinder
                 continue;\r
             }\r
 \r
-            item = seq.getSequence();\r
+            item = seq.getSequenceAsString();\r
             if(!caseSensitive.isSelected())\r
               item = item.toUpperCase();\r
 \r