X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FSeqCanvas.java;h=20ec66595bb44e3f8278f713dc8e7c04a5afecc1;hb=a6789f8a91ca11fac840b958ee9207581ea4d14f;hp=5667b6ef318d0326046b884169e0748d549b1734;hpb=584c1b0136786968958e22e52b6ce51bd24511e5;p=jalview.git diff --git a/src/jalview/appletgui/SeqCanvas.java b/src/jalview/appletgui/SeqCanvas.java index 5667b6e..20ec665 100755 --- a/src/jalview/appletgui/SeqCanvas.java +++ b/src/jalview/appletgui/SeqCanvas.java @@ -37,7 +37,7 @@ import java.awt.Graphics; import java.awt.Image; import java.awt.Panel; import java.beans.PropertyChangeEvent; -import java.util.List; +import java.util.Iterator; public class SeqCanvas extends Panel implements ViewportListenerI { @@ -491,21 +491,16 @@ public class SeqCanvas extends Panel implements ViewportListenerI HiddenColumns hidden = av.getAlignment().getHiddenColumns(); g.setColor(Color.blue); int res; - List positions = hidden.findHiddenRegionPositions(startRes, - endx + 1); - for (int pos : positions) + Iterator it = hidden.getBoundedStartIterator(startRes, + endx + 1, true); + while (it.hasNext()) { - res = pos - startRes; - + res = it.next() - startRes; gg.fillPolygon( new int[] - { res * avcharWidth - avcharHeight / 4, - res * avcharWidth + avcharHeight / 4, - res * avcharWidth }, + { res * avcharWidth - avcharHeight / 4, res * avcharWidth + avcharHeight / 4, res * avcharWidth }, new int[] - { ypos - (avcharHeight / 2), ypos - (avcharHeight / 2), - ypos - (avcharHeight / 2) + 8 }, - 3); + { ypos - (avcharHeight / 2), ypos - (avcharHeight / 2), ypos - (avcharHeight / 2) + 8 }, 3); } }