JAL-2392 formatting
[jalview.git] / src / jalview / gui / ProgressBar.java
index bb5e780..3e91361 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * 
+ * 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 
+ * 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 
+ * 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/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
 package jalview.gui;
 
 import jalview.util.MessageManager;
@@ -69,8 +89,8 @@ public class ProgressBar implements IProgressIndicator
     }
     this.statusPanel = container;
     this.statusBar = statusBar;
-    this.progressBars = new Hashtable<Long, JPanel>();
-    this.progressBarHandlers = new Hashtable<Long, IProgressIndicatorHandler>();
+    this.progressBars = new Hashtable<>();
+    this.progressBarHandlers = new Hashtable<>();
 
   }
 
@@ -199,8 +219,8 @@ public class ProgressBar implements IProgressIndicator
     final JPanel progressPanel = progressBars.get(longId);
     if (progressPanel == null)
     {
-      System.err
-              .println("call setProgressBar before registering the progress bar's handler.");
+      System.err.println(
+              "call setProgressBar before registering the progress bar's handler.");
       return;
     }
 
@@ -222,10 +242,10 @@ public class ProgressBar implements IProgressIndicator
       public void actionPerformed(ActionEvent e)
       {
         handler.cancelActivity(id);
-        us.setProgressBar(MessageManager.formatMessage(
-                "label.cancelled_params",
-                new Object[] { ((JLabel) progressPanel.getComponent(0))
-                        .getText() }), id);
+        us.setProgressBar(MessageManager
+                .formatMessage("label.cancelled_params", new Object[]
+                { ((JLabel) progressPanel.getComponent(0)).getText() }),
+                id);
       }
     });
     progressPanel.add(cancel, BorderLayout.EAST);