JAL-1432 updated copyright notices
[jalview.git] / src / jalview / gui / FeatureSettings.java
index da7bc57..9f73873 100755 (executable)
@@ -1,19 +1,20 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
- * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
+ * Copyright (C) 2014 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;
 
@@ -23,8 +24,6 @@ import java.util.List;
 
 import java.awt.*;
 import java.awt.event.*;
-import java.awt.geom.AffineTransform;
-import java.awt.image.BufferedImage;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 
@@ -315,15 +314,15 @@ public class FeatureSettings extends JPanel
     Vector allGroups = new Vector();
     SequenceFeature[] tmpfeatures;
     String group;
-    for (int i = 0; i < af.getViewport().alignment.getHeight(); i++)
+    for (int i = 0; i < af.getViewport().getAlignment().getHeight(); i++)
     {
-      if (af.getViewport().alignment.getSequenceAt(i).getDatasetSequence()
-              .getSequenceFeatures() == null)
+      if (af.getViewport().getAlignment().getSequenceAt(i)
+              .getDatasetSequence().getSequenceFeatures() == null)
       {
         continue;
       }
 
-      tmpfeatures = af.getViewport().alignment.getSequenceAt(i)
+      tmpfeatures = af.getViewport().getAlignment().getSequenceAt(i)
               .getDatasetSequence().getSequenceFeatures();
 
       int index = 0;
@@ -444,10 +443,10 @@ public class FeatureSettings extends JPanel
     // Find out which features should be visible depending on which groups
     // are selected / deselected
     // and recompute average width ordering
-    for (int i = 0; i < af.getViewport().alignment.getHeight(); i++)
+    for (int i = 0; i < af.getViewport().getAlignment().getHeight(); i++)
     {
 
-      tmpfeatures = af.getViewport().alignment.getSequenceAt(i)
+      tmpfeatures = af.getViewport().getAlignment().getSequenceAt(i)
               .getDatasetSequence().getSequenceFeatures();
       if (tmpfeatures == null)
       {
@@ -716,13 +715,13 @@ public class FeatureSettings extends JPanel
         PrintWriter out = new PrintWriter(new OutputStreamWriter(
                 new FileOutputStream(choice), "UTF-8"));
 
-        Enumeration e = fr.featureColours.keys();
+        Iterator e = fr.featureColours.keySet().iterator();
         float[] sortOrder = new float[fr.featureColours.size()];
         String[] sortTypes = new String[fr.featureColours.size()];
         int i = 0;
-        while (e.hasMoreElements())
+        while (e.hasNext())
         {
-          sortTypes[i] = e.nextElement().toString();
+          sortTypes[i] = e.next().toString();
           sortOrder[i] = fr.getOrder(sortTypes[i]);
           i++;
         }
@@ -1136,13 +1135,13 @@ public class FeatureSettings extends JPanel
 
       if (fr.featureGroups != null)
       {
-        Enumeration en = fr.featureGroups.keys();
+        Iterator en = fr.featureGroups.keySet().iterator();
         gps = new String[fr.featureColours.size()];
         int g = 0;
         boolean valid = false;
-        while (en.hasMoreElements())
+        while (en.hasNext())
         {
-          String gp = (String) en.nextElement();
+          String gp = (String) en.next();
           Boolean on = (Boolean) fr.featureGroups.get(gp);
           if (on != null && on.booleanValue())
           {
@@ -1255,7 +1254,8 @@ public class FeatureSettings extends JPanel
   public void fetchDasFeatures(Vector sources, boolean block)
   {
     initDasSources();
-    List<jalviewSourceI> resolved = dassourceBrowser.sourceRegistry.resolveSourceNicknames(sources);
+    List<jalviewSourceI> resolved = dassourceBrowser.sourceRegistry
+            .resolveSourceNicknames(sources);
     if (resolved.size() == 0)
     {
       resolved = dassourceBrowser.getSelectedSources();