{
int ifpos = seq.findIndex(fpos) - 1;
int ilpos = seq.findIndex(lpos) - 1;
- return new int[] { ifpos, ilpos, fpos, lpos, ifpos, ilpos };
+ return new int[] { ifpos, ifpos, ilpos };
}
// Simply walk along the sequence whilst watching for hidden column
}
if (foundStart)
{
- return new int[] { findColumnPosition(start),
- findColumnPosition(lastvispos), fpos, lpos, firstP, lastP };
+ return new int[] { findColumnPosition(start), firstP, lastP };
}
// otherwise, sequence was completely hidden
- return new int[] { visPrev, visNext, 0, 0, firstP, lastP };
+ return new int[] { visPrev, firstP, lastP };
} finally
{
LOCK.readLock().unlock();
assertEquals(4, h.adjustForHiddenColumns(2));
}
- /*@Test(groups = "Functional")
- public void testCompensateForEdit()
- {
- HiddenColumns2 h = new HiddenColumns2();
-
- ColumnSelection sel = new ColumnSelection();
- assertNull(h.compensateForEdit(10, 3, sel));
-
- h.hideColumns(3, 4);
- List<int[]> result = h.compensateForEdit(10, 3, sel);
- assertEquals(0, result.size());
-
- // edit partially overlapping hidden
-
- h = new HiddenColumns2();
- h.hideColumns(15, 17);
- result = h.compensateForEdit(10, 6, sel);
- assertEquals(0, result.size());
-
- HiddenColumns2 h2 = new HiddenColumns2();
- h2.hideColumns(9, 11);
- assertTrue(h.equals(h2));
-
- // edit fully overlapping hidden
-
- h = new HiddenColumns2();
- h.hideColumns(15, 17);
- result = h.compensateForEdit(10, 8, sel);
- assertEquals(result.get(0)[0], 15);
- assertEquals(result.get(0)[1], 17);
- assertFalse(h.hasHiddenColumns());
-
- // edit at start
-
- h = new HiddenColumns2();
- h.hideColumns(0, 3);
- result = h.compensateForEdit(0, 4, sel);
- assertEquals(0, result.size());
- assertEquals(sel.getSelected().size(), 4);
- assertFalse(h.hasHiddenColumns());
- }*/
-
- /*@Test(groups = "Functional")
- public void testCompensateForDelEdits()
- {
- HiddenColumns2 h = new HiddenColumns2();
- HiddenColumns2 h2 = new HiddenColumns2();
-
- h.compensateForDelEdits(10, 3);
- assertFalse(h.hasHiddenColumns());
-
- h = new HiddenColumns2();
- h.hideColumns(3, 4);
- h.compensateForDelEdits(10, 3);
- h2.hideColumns(3, 4);
- assertTrue(h.equals(h2));
-
- h = new HiddenColumns2();
- h.hideColumns(15, 17);
- h.compensateForDelEdits(10, 6);
- h2 = new HiddenColumns2();
- h2.hideColumns(9, 11);
- assertTrue(h.equals(h2));
-
- h = new HiddenColumns2();
- h.hideColumns(15, 17);
- h.compensateForDelEdits(10, 8);
- h2 = new HiddenColumns2();
- h2.hideColumns(7, 9);
- assertTrue(h.equals(h2));
-
- h = new HiddenColumns2();
- h.hideColumns(0, 3);
- h.compensateForDelEdits(0, 4);
- h2 = new HiddenColumns2();
- h2.hideColumns(0, 0);
- assertTrue(h.equals(h2));
- }*/
-
@Test(groups = "Functional")
public void testGetHiddenBoundaryLeft()
{