X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FSeqCanvas.java;h=9c2fd7393c8c10d37107a1acbccd10f0f0802e88;hb=10ff37d2cb03f342ddbed679951d3e2fef0a404b;hp=903c694a0543aa58affeafd8dd63648b8b2bd027;hpb=a8f483d04205bb8273ee311c12968b7e86d205fa;p=jalview.git diff --git a/src/jalview/appletgui/SeqCanvas.java b/src/jalview/appletgui/SeqCanvas.java index 903c694..9c2fd73 100755 --- a/src/jalview/appletgui/SeqCanvas.java +++ b/src/jalview/appletgui/SeqCanvas.java @@ -6,21 +6,31 @@ * * 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. + * 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 . + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.appletgui; -import java.awt.*; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.SearchResults; +import jalview.datamodel.SequenceGroup; +import jalview.datamodel.SequenceI; -import jalview.datamodel.*; +import java.awt.Color; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.Panel; +import java.util.List; public class SeqCanvas extends Panel { @@ -514,15 +524,14 @@ public class SeqCanvas extends Panel } else { - java.util.Vector regions = av.getColumnSelection().getHiddenColumns(); + List regions = av.getColumnSelection().getHiddenColumns(); int screenY = 0; int blockStart = startRes; int blockEnd = endRes; - for (int i = 0; i < regions.size(); i++) + for (int[] region : regions) { - int[] region = (int[]) regions.elementAt(i); int hideStart = region[0]; int hideEnd = region[1]; @@ -644,7 +653,7 @@ public class SeqCanvas extends Panel if ((group == null) && (av.getAlignment().getGroups().size() > 0)) { - group = (SequenceGroup) av.getAlignment().getGroups().get(0); + group = av.getAlignment().getGroups().get(0); groupIndex = 0; } @@ -801,7 +810,7 @@ public class SeqCanvas extends Panel break; } - group = (SequenceGroup) av.getAlignment().getGroups() + group = av.getAlignment().getGroups() .get(groupIndex); } while (groupIndex < av.getAlignment().getGroups().size());