From 15662a256b76221299688fff94288d9bd37f8453 Mon Sep 17 00:00:00 2001 From: kiramt Date: Mon, 5 Feb 2018 13:49:19 +0000 Subject: [PATCH] JAL-2759 Rename getBoundedStartIterator --- .../main/java/org/jalview/HiddenColsIteratorsBenchmark.java | 2 +- src/jalview/appletgui/ScalePanel.java | 2 +- src/jalview/appletgui/SeqCanvas.java | 2 +- src/jalview/datamodel/HiddenColumns.java | 2 +- src/jalview/gui/ScalePanel.java | 2 +- src/jalview/gui/SeqCanvas.java | 2 +- test/jalview/datamodel/HiddenColumnsTest.java | 10 +++++----- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/benchmarking/src/main/java/org/jalview/HiddenColsIteratorsBenchmark.java b/benchmarking/src/main/java/org/jalview/HiddenColsIteratorsBenchmark.java index 6d5863b..477bfad 100644 --- a/benchmarking/src/main/java/org/jalview/HiddenColsIteratorsBenchmark.java +++ b/benchmarking/src/main/java/org/jalview/HiddenColsIteratorsBenchmark.java @@ -104,7 +104,7 @@ public class HiddenColsIteratorsBenchmark { { int res = 0; int startx = tstate.visibleColumn; - Iterator it = tstate.h.getBoundedStartIterator(startx, + Iterator it = tstate.h.getStartRegionIterator(startx, startx+60); while (it.hasNext()) { diff --git a/src/jalview/appletgui/ScalePanel.java b/src/jalview/appletgui/ScalePanel.java index d240d86..c91449f 100755 --- a/src/jalview/appletgui/ScalePanel.java +++ b/src/jalview/appletgui/ScalePanel.java @@ -437,7 +437,7 @@ public class ScalePanel extends Panel if (av.getShowHiddenMarkers()) { int widthx = 1 + endx - startx; - Iterator it = hidden.getBoundedStartIterator(startx, + Iterator it = hidden.getStartRegionIterator(startx, startx + widthx + 1); while (it.hasNext()) { diff --git a/src/jalview/appletgui/SeqCanvas.java b/src/jalview/appletgui/SeqCanvas.java index 6f078ea..35d73de 100755 --- a/src/jalview/appletgui/SeqCanvas.java +++ b/src/jalview/appletgui/SeqCanvas.java @@ -492,7 +492,7 @@ public class SeqCanvas extends Panel implements ViewportListenerI HiddenColumns hidden = av.getAlignment().getHiddenColumns(); g.setColor(Color.blue); int res; - Iterator it = hidden.getBoundedStartIterator(startRes, + Iterator it = hidden.getStartRegionIterator(startRes, endx + 1); while (it.hasNext()) { diff --git a/src/jalview/datamodel/HiddenColumns.java b/src/jalview/datamodel/HiddenColumns.java index a9cd4d7..8f6ecd6 100644 --- a/src/jalview/datamodel/HiddenColumns.java +++ b/src/jalview/datamodel/HiddenColumns.java @@ -1045,7 +1045,7 @@ public class HiddenColumns * @param end * position to end at (inclusive, visible column position) */ - public Iterator getBoundedStartIterator(int start, int end) + public Iterator getStartRegionIterator(int start, int end) { try { diff --git a/src/jalview/gui/ScalePanel.java b/src/jalview/gui/ScalePanel.java index c8040de..f772a1f 100755 --- a/src/jalview/gui/ScalePanel.java +++ b/src/jalview/gui/ScalePanel.java @@ -488,7 +488,7 @@ public class ScalePanel extends JPanel if (av.getShowHiddenMarkers()) { - Iterator it = hidden.getBoundedStartIterator(startx, + Iterator it = hidden.getStartRegionIterator(startx, startx + widthx + 1); while (it.hasNext()) { diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 6052d1f..cdf84b7 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -895,7 +895,7 @@ public class SeqCanvas extends JComponent implements ViewportListenerI int res; HiddenColumns hidden = av.getAlignment().getHiddenColumns(); - Iterator it = hidden.getBoundedStartIterator(startColumn, + Iterator it = hidden.getStartRegionIterator(startColumn, endColumn); while (it.hasNext()) { diff --git a/test/jalview/datamodel/HiddenColumnsTest.java b/test/jalview/datamodel/HiddenColumnsTest.java index f15f7ad..2916199 100644 --- a/test/jalview/datamodel/HiddenColumnsTest.java +++ b/test/jalview/datamodel/HiddenColumnsTest.java @@ -1129,7 +1129,7 @@ public class HiddenColumnsTest public void testBoundedStartIterator() { HiddenColumns h = new HiddenColumns(); - Iterator it = h.getBoundedStartIterator(0, 10); + Iterator it = h.getStartRegionIterator(0, 10); // no hidden columns = nothing to iterate over assertFalse(it.hasNext()); @@ -1138,7 +1138,7 @@ public class HiddenColumnsTest // all regions are returned h.hideColumns(3, 10); h.hideColumns(14, 16); - it = h.getBoundedStartIterator(0, 20); + it = h.getStartRegionIterator(0, 20); assertTrue(it.hasNext()); int next = it.next(); assertEquals(3, next); @@ -1148,12 +1148,12 @@ public class HiddenColumnsTest // [start,end] does not contain a start of a region // no regions to iterate over - it = h.getBoundedStartIterator(4, 5); + it = h.getStartRegionIterator(4, 5); assertFalse(it.hasNext()); // [start,end] fully contains 1 region and start of last // - 2 regions returned - it = h.getBoundedStartIterator(3, 7); + it = h.getStartRegionIterator(3, 7); assertTrue(it.hasNext()); next = it.next(); assertEquals(3, next); @@ -1163,7 +1163,7 @@ public class HiddenColumnsTest // [start,end] contains whole of last region // - 1 region returned - it = h.getBoundedStartIterator(4, 20); + it = h.getStartRegionIterator(4, 20); assertTrue(it.hasNext()); next = it.next(); assertEquals(6, next); -- 1.7.10.2