javatidy
[jalview.git] / src / jalview / gui / SequenceFetcher.java
index e43f82c..9c51409 100755 (executable)
@@ -1,18 +1,18 @@
 /*
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
- * 
+ *
  * This file is part of Jalview.
- * 
+ *
  * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License 
+ * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- * 
- * Jalview is distributed in the hope that it will be useful, but 
- * WITHOUT ANY WARRANTY; without even the implied warranty 
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  * PURPOSE.  See the GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  */
 package jalview.gui;
@@ -25,16 +25,11 @@ import java.awt.event.*;
 
 import javax.swing.*;
 import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.MutableTreeNode;
-import javax.swing.tree.TreeModel;
-
 import jalview.datamodel.*;
 import jalview.io.*;
 import jalview.util.DBRefUtils;
 import jalview.ws.dbsources.das.api.DasSourceRegistryI;
 import jalview.ws.seqfetcher.DbSourceProxy;
-import jalview.ws.seqfetcher.DbSourceProxyImpl;
-
 import java.awt.BorderLayout;
 
 public class SequenceFetcher extends JPanel implements Runnable
@@ -63,7 +58,7 @@ public class SequenceFetcher extends JPanel implements Runnable
   /**
    * Blocking method that initialises and returns the shared instance of the
    * SequenceFetcher client
-   * 
+   *
    * @param guiWindow
    *          - where the initialisation delay message should be shown
    * @return the singleton instance of the sequence fetcher client
@@ -142,6 +137,7 @@ public class SequenceFetcher extends JPanel implements Runnable
     Thread sf = new Thread(new Runnable()
     {
 
+      @Override
       public void run()
       {
         if (getSequenceFetcherSingleton(guiWindow) != null)
@@ -152,6 +148,7 @@ public class SequenceFetcher extends JPanel implements Runnable
         {
           javax.swing.SwingUtilities.invokeLater(new Runnable()
           {
+            @Override
             public void run()
             {
               JOptionPane
@@ -182,7 +179,7 @@ public class SequenceFetcher extends JPanel implements Runnable
 
   /**
    * called by thread spawned by constructor
-   * 
+   *
    * @param guiWindow
    */
   private void initGui(IProgressIndicator guiWindow)
@@ -236,6 +233,7 @@ public class SequenceFetcher extends JPanel implements Runnable
     ok.setText("OK");
     ok.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         ok_actionPerformed();
@@ -244,6 +242,7 @@ public class SequenceFetcher extends JPanel implements Runnable
     clear.setText("Clear");
     clear.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         clear_actionPerformed();
@@ -253,6 +252,7 @@ public class SequenceFetcher extends JPanel implements Runnable
     example.setText("Example");
     example.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         example_actionPerformed();
@@ -261,6 +261,7 @@ public class SequenceFetcher extends JPanel implements Runnable
     close.setText("Close");
     close.addActionListener(new ActionListener()
     {
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         close_actionPerformed(e);
@@ -270,6 +271,7 @@ public class SequenceFetcher extends JPanel implements Runnable
     textArea.setLineWrap(true);
     textArea.addKeyListener(new KeyAdapter()
     {
+      @Override
       public void keyPressed(KeyEvent e)
       {
         if (e.getKeyCode() == KeyEvent.VK_ENTER)
@@ -289,6 +291,7 @@ public class SequenceFetcher extends JPanel implements Runnable
     database.addActionListener(new ActionListener()
     {
 
+      @Override
       public void actionPerformed(ActionEvent e)
       {
         try
@@ -416,6 +419,7 @@ public class SequenceFetcher extends JPanel implements Runnable
     close.setEnabled(true);
   }
 
+  @Override
   public void run()
   {
     String error = "";
@@ -721,7 +725,7 @@ public class SequenceFetcher extends JPanel implements Runnable
   }
 
   /**
-   * 
+   *
    * @return a standard title for any results retrieved using the currently
    *         selected source and settings
    */
@@ -809,6 +813,7 @@ public class SequenceFetcher extends JPanel implements Runnable
     resetDialog();
     javax.swing.SwingUtilities.invokeLater(new Runnable()
     {
+      @Override
       public void run()
       {
         JOptionPane.showInternalMessageDialog(Desktop.desktop, error,