Formatting
[jalview.git] / src / jalview / jbgui / GFinder.java
index b8dcad3..9d72d26 100755 (executable)
@@ -1,6 +1,6 @@
 /*
  * Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -22,9 +22,9 @@ import java.awt.*;
 import java.awt.event.*;
 import javax.swing.*;
 import javax.swing.event.*;
-import jalview.io.FormatAdapter;
-import jalview.datamodel.Alignment;
-import java.awt.BorderLayout;
+
+import jalview.datamodel.*;
+import jalview.io.*;
 
 public class GFinder
     extends JPanel
@@ -105,10 +105,12 @@ public class GFinder
         textfield_caretUpdate(e);
       }
     });
-    textfield.addKeyListener(new java.awt.event.KeyAdapter() {
-        public void keyPressed(KeyEvent e) {
-            textfield_keyPressed(e);
-        }
+    textfield.addKeyListener(new java.awt.event.KeyAdapter()
+    {
+      public void keyPressed(KeyEvent e)
+      {
+        textfield_keyPressed(e);
+      }
     });
 
     borderLayout1.setHgap(5);
@@ -140,10 +142,9 @@ public class GFinder
   {
   }
 
-
   protected void textfield_keyPressed(KeyEvent e)
   {
-    if(e.getKeyCode()==KeyEvent.VK_ENTER)
+    if (e.getKeyCode() == KeyEvent.VK_ENTER)
     {
       e.consume();
       findNext_actionPerformed(null);
@@ -164,9 +165,13 @@ public class GFinder
         {
           String str = textfield.getText();
           Alignment al = null;
-          try{al = new FormatAdapter().readFile(str, "Paste", "FASTA");}
-          catch(Exception ex){}
-          if(al!=null && al.getHeight()>0)
+          try
+          {
+            al = new FormatAdapter().readFile(str, "Paste", "FASTA");
+          }
+          catch (Exception ex)
+          {}
+          if (al != null && al.getHeight() > 0)
           {
             str = jalview.analysis.AlignSeq.extractGaps(
                 jalview.util.Comparison.GapChars,