Formatting changes
[jalview.git] / src / jalview / jbgui / GFinder.java
index 554d8bc..0f9f0d4 100755 (executable)
@@ -1,37 +1,37 @@
 /*\r
-* Jalview - A Sequence Alignment Editor and Viewer\r
-* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
-*\r
-* This program is free software; you can redistribute it and/or\r
-* modify it under the terms of the GNU General Public License\r
-* as published by the Free Software Foundation; either version 2\r
-* of the License, or (at your option) any later version.\r
-*\r
-* This program is distributed in the hope that it will be useful,\r
-* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-* GNU General Public License for more details.\r
-*\r
-* You should have received a copy of the GNU General Public License\r
-* along with this program; if not, write to the Free Software\r
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
-*/\r
+ * Jalview - A Sequence Alignment Editor and Viewer\r
+ * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
+ */\r
 package jalview.jbgui;\r
 \r
 import java.awt.*;\r
 import java.awt.event.*;\r
-\r
 import javax.swing.*;\r
-import javax.swing.event.CaretListener;\r
-import javax.swing.event.CaretEvent;\r
+import javax.swing.event.*;\r
 \r
-public class GFinder extends JPanel {\r
-    JLabel jLabel1 = new JLabel();\r
+public class GFinder\r
+    extends JPanel\r
+{\r
+  JLabel jLabel1 = new JLabel();\r
   protected JButton findAll = new JButton();\r
-    protected JButton findNext = new JButton();\r
-    JPanel jPanel1 = new JPanel();\r
-    GridLayout gridLayout1 = new GridLayout();\r
-    protected JButton createNewGroup = new JButton();\r
+  protected JButton findNext = new JButton();\r
+  JPanel jPanel1 = new JPanel();\r
+  GridLayout gridLayout1 = new GridLayout();\r
+  protected JButton createNewGroup = new JButton();\r
   JScrollPane jScrollPane1 = new JScrollPane();\r
   protected JTextArea textfield = new JTextArea();\r
   BorderLayout borderLayout1 = new BorderLayout();\r
@@ -41,47 +41,59 @@ public class GFinder extends JPanel {
   BorderLayout borderLayout2 = new BorderLayout();\r
   JPanel jPanel5 = new JPanel();\r
   JPanel jPanel6 = new JPanel();\r
-  public GFinder() {\r
-        try {\r
-            jbInit();\r
-        } catch (Exception e) {\r
-            e.printStackTrace();\r
-        }\r
+  public GFinder()\r
+  {\r
+    try\r
+    {\r
+      jbInit();\r
     }\r
+    catch (Exception e)\r
+    {\r
+      e.printStackTrace();\r
+    }\r
+  }\r
 \r
-    private void jbInit() throws Exception {\r
-        jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));\r
-        jLabel1.setText("Find");\r
+  private void jbInit()\r
+      throws Exception\r
+  {\r
+    jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));\r
+    jLabel1.setText("Find");\r
     this.setLayout(borderLayout1);\r
     findAll.setFont(new java.awt.Font("Verdana", 0, 12));\r
-        findAll.setText("Find all");\r
-        findAll.addActionListener(new java.awt.event.ActionListener() {\r
-                public void actionPerformed(ActionEvent e) {\r
-                    findAll_actionPerformed(e);\r
-                }\r
-            });\r
-        findNext.setEnabled(false);\r
-        findNext.setFont(new java.awt.Font("Verdana", 0, 12));\r
-        findNext.setText("Find Next");\r
-        findNext.addActionListener(new java.awt.event.ActionListener() {\r
-                public void actionPerformed(ActionEvent e) {\r
-                    findNext_actionPerformed(e);\r
-                }\r
-            });\r
+    findAll.setText("Find all");\r
+    findAll.addActionListener(new java.awt.event.ActionListener()\r
+    {\r
+      public void actionPerformed(ActionEvent e)\r
+      {\r
+        findAll_actionPerformed(e);\r
+      }\r
+    });\r
+    findNext.setEnabled(false);\r
+    findNext.setFont(new java.awt.Font("Verdana", 0, 12));\r
+    findNext.setText("Find Next");\r
+    findNext.addActionListener(new java.awt.event.ActionListener()\r
+    {\r
+      public void actionPerformed(ActionEvent e)\r
+      {\r
+        findNext_actionPerformed(e);\r
+      }\r
+    });\r
     jPanel1.setLayout(gridLayout1);\r
-        gridLayout1.setHgap(0);\r
-        gridLayout1.setRows(3);\r
-        gridLayout1.setVgap(2);\r
-        createNewGroup.setEnabled(false);\r
-        createNewGroup.setFont(new java.awt.Font("Verdana", 0, 12));\r
-        createNewGroup.setToolTipText("");\r
-        createNewGroup.setMargin(new Insets(0, 0, 0, 0));\r
-        createNewGroup.setText("Create new group");\r
-        createNewGroup.addActionListener(new java.awt.event.ActionListener() {\r
-                public void actionPerformed(ActionEvent e) {\r
-                    createNewGroup_actionPerformed(e);\r
-                }\r
-            });\r
+    gridLayout1.setHgap(0);\r
+    gridLayout1.setRows(3);\r
+    gridLayout1.setVgap(2);\r
+    createNewGroup.setEnabled(false);\r
+    createNewGroup.setFont(new java.awt.Font("Verdana", 0, 12));\r
+    createNewGroup.setToolTipText("");\r
+    createNewGroup.setMargin(new Insets(0, 0, 0, 0));\r
+    createNewGroup.setText("Create new group");\r
+    createNewGroup.addActionListener(new java.awt.event.ActionListener()\r
+    {\r
+      public void actionPerformed(ActionEvent e)\r
+      {\r
+        createNewGroup_actionPerformed(e);\r
+      }\r
+    });\r
     textfield.setFont(new java.awt.Font("Verdana", Font.PLAIN, 12));\r
     textfield.setText("");\r
     textfield.setLineWrap(true);\r
@@ -98,8 +110,8 @@ public class GFinder extends JPanel {
     jPanel2.setPreferredSize(new Dimension(10, 1));\r
     jPanel3.setPreferredSize(new Dimension(10, 1));\r
     jPanel1.add(findNext, null);\r
-        jPanel1.add(findAll, null);\r
-        jPanel1.add(createNewGroup, null);\r
+    jPanel1.add(findAll, null);\r
+    jPanel1.add(createNewGroup, null);\r
     this.add(jLabel1, java.awt.BorderLayout.WEST);\r
     this.add(jPanel1, java.awt.BorderLayout.EAST);\r
     this.add(jPanel2, java.awt.BorderLayout.SOUTH);\r
@@ -111,35 +123,40 @@ public class GFinder extends JPanel {
     jScrollPane1.getViewport().add(textfield);\r
   }\r
 \r
-    protected void findNext_actionPerformed(ActionEvent e) {\r
-    }\r
+  protected void findNext_actionPerformed(ActionEvent e)\r
+  {\r
+  }\r
 \r
-    protected void findAll_actionPerformed(ActionEvent e) {\r
-    }\r
+  protected void findAll_actionPerformed(ActionEvent e)\r
+  {\r
+  }\r
 \r
-    protected void textfield_actionPerformed(ActionEvent e) {\r
-    }\r
+  protected void textfield_actionPerformed(ActionEvent e)\r
+  {\r
+  }\r
 \r
-    void textfield_keyTyped(KeyEvent e) {\r
-        findNext.setEnabled(true);\r
-    }\r
+  void textfield_keyTyped(KeyEvent e)\r
+  {\r
+    findNext.setEnabled(true);\r
+  }\r
 \r
-    public void createNewGroup_actionPerformed(ActionEvent e) {\r
-    }\r
+  public void createNewGroup_actionPerformed(ActionEvent e)\r
+  {\r
+  }\r
 \r
   public void textfield_caretUpdate(CaretEvent e)\r
   {\r
-    if (textfield.getText().indexOf("\t")>-1)\r
+    if (textfield.getText().indexOf("\t") > -1)\r
     {\r
       SwingUtilities.invokeLater(new Runnable()\r
       {\r
         public void run()\r
         {\r
-            String text = textfield.getText();\r
-            text = text.substring(text.lastIndexOf("\t") + 1).trim();\r
-            text = jalview.analysis.AlignSeq.extractGaps(\r
-                 jalview.util.Comparison.GapChars, text);\r
-            textfield.setText(text);\r
+          String text = textfield.getText();\r
+          text = text.substring(text.lastIndexOf("\t") + 1).trim();\r
+          text = jalview.analysis.AlignSeq.extractGaps(\r
+              jalview.util.Comparison.GapChars, text);\r
+          textfield.setText(text);\r
         }\r
       });\r
     }\r