X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fappletgui%2FScalePanel.java;h=b65af2e843ff7b1827428e5124590f3761163b5c;hb=9317de4ce997ec39dee25ec507c12807c5067d7d;hp=e00db7c3e2a0f2c778c76e1b155f291c6181126a;hpb=5e92df41fe4f6fa8b50c3a65000bdb8ddcdc901f;p=jalview.git diff --git a/src/jalview/appletgui/ScalePanel.java b/src/jalview/appletgui/ScalePanel.java index e00db7c..b65af2e 100755 --- a/src/jalview/appletgui/ScalePanel.java +++ b/src/jalview/appletgui/ScalePanel.java @@ -42,6 +42,7 @@ import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.beans.PropertyChangeEvent; +import java.util.Iterator; import java.util.List; public class ScalePanel extends Panel @@ -141,7 +142,7 @@ public class ScalePanel extends Panel sg.setStartRes(min); sg.setEndRes(max); } - ap.paintAlignment(false); + ap.paintAlignment(false, false); av.sendSelection(); } @@ -167,7 +168,7 @@ public class ScalePanel extends Panel { av.showColumn(reveal[0]); reveal = null; - ap.paintAlignment(true); + ap.paintAlignment(true, true); av.sendSelection(); } }); @@ -183,7 +184,7 @@ public class ScalePanel extends Panel { av.showAllHiddenColumns(); reveal = null; - ap.paintAlignment(true); + ap.paintAlignment(true, true); av.sendSelection(); } }); @@ -208,7 +209,7 @@ public class ScalePanel extends Panel av.setSelectionGroup(null); } - ap.paintAlignment(true); + ap.paintAlignment(true, true); av.sendSelection(); } }); @@ -239,7 +240,7 @@ public class ScalePanel extends Panel if (!stretchingGroup) { - ap.paintAlignment(false); + ap.paintAlignment(false, false); return; } @@ -256,7 +257,7 @@ public class ScalePanel extends Panel } stretchingGroup = false; - ap.paintAlignment(false); + ap.paintAlignment(false, false); av.sendSelection(); } @@ -285,7 +286,7 @@ public class ScalePanel extends Panel { stretchingGroup = true; cs.stretchGroup(res, sg, min, max); - ap.paintAlignment(false); + ap.paintAlignment(false, false); } } @@ -436,19 +437,17 @@ public class ScalePanel extends Panel if (av.getShowHiddenMarkers()) { int widthx = 1 + endx - startx; - List positions = hidden.findHiddenRegionPositions(startx, + Iterator it = hidden.getBoundedStartIterator(startx, startx + widthx + 1); - for (int pos : positions) + while (it.hasNext()) { - res = pos - startx; + res = it.next() - startx; gg.fillPolygon( new int[] - { -1 + res * avCharWidth - avcharHeight / 4, - -1 + res * avCharWidth + avcharHeight / 4, - -1 + res * avCharWidth }, - new int[] - { y, y, y + 2 * yOf }, 3); + { -1 + res * avCharWidth - avcharHeight / 4, -1 + res * avCharWidth + avcharHeight / 4, + -1 + res * avCharWidth }, new int[] + { y, y, y + 2 * yOf }, 3); } } }