JAL-3074 don't scroll up/down on drag out of scale or annotation panel, performance...
[jalview.git] / src / jalview / datamodel / Alignment.java
index 3ba35b6..93ad332 100755 (executable)
@@ -712,39 +712,10 @@ public class Alignment implements AlignmentI
   
     for (int i = 0; i < sequences.size(); i++)
     {
-      if (getSequenceAt(i).getLength() > maxLength)
-      {
-        maxLength = getSequenceAt(i).getLength();
-      }
+      maxLength = Math.max(maxLength, getSequenceAt(i).getLength());
     }
-  
     return maxLength;
   }
-  /*
-  @Override
-  public int getWidth()
-  {
-    final Wrapper temp = new Wrapper();
-  
-    forEachSequence(new Consumer<SequenceI>()
-    {
-      @Override
-      public void accept(SequenceI s)
-      {
-        if (s.getLength() > temp.inner)
-        {
-          temp.inner = s.getLength();
-        }
-      }
-    }, 0, sequences.size() - 1);
-  
-    return temp.inner;
-  }
-  
-  public static class Wrapper
-  {
-    public int inner;
-  }*/
 
   /**
    * DOCUMENT ME!