JAL-1648 House keeping
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 24 Apr 2017 15:06:22 +0000 (16:06 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 24 Apr 2017 15:06:22 +0000 (16:06 +0100)
src/jalview/gui/Finder.java
src/jalview/io/cache/JvCacheableInputBox.java
src/jalview/jbgui/GFinder.java

index 0f8bb5e..a314cef 100755 (executable)
@@ -248,7 +248,7 @@ public class Finder extends GFinder
   {
     createNewGroup.setEnabled(false);
 
-    String searchString = searchBox.getEditor().getItem().toString().trim();
+    String searchString = searchBox.getUserInput().trim();
 
     if (isInvalidSearchString(searchString))
     {
index 3475d4f..2cf1678 100644 (file)
@@ -95,7 +95,7 @@ public class JvCacheableInputBox<E> extends JComboBox<String>
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        System.out.println(">>>>> Clear cache items");
+        // System.out.println(">>>>> Clear cache items");
         setSelectedItem("");
         appCache.deleteCacheItems(cacheKey);
         updateCache();
index 144c67d..ee8a81a 100755 (executable)
@@ -209,14 +209,14 @@ public class GFinder extends JPanel
 
   public void textfield_caretUpdate(CaretEvent e)
   {
-    if (searchBox.getEditor().getItem().toString().indexOf(">") > -1)
+    if (searchBox.getUserInput().indexOf(">") > -1)
     {
       SwingUtilities.invokeLater(new Runnable()
       {
         @Override
         public void run()
         {
-          String str = searchBox.getEditor().getItem().toString();
+          String str = searchBox.getUserInput();
           AlignmentI al = null;
           try
           {
@@ -231,7 +231,6 @@ public class GFinder extends JPanel
                     jalview.util.Comparison.GapChars, al.getSequenceAt(0)
                             .getSequenceAsString());
 
-            searchBox.setSelectedItem(str);
           }
         }
       });