- // box width back to normal, boxX and scrollCol move to right of hidden area
- // TODO currently this test fails in the Jalview GUI, there is a gap between
- // the rhs of the hidden area and the box
- /* xpos = 50;
- mouseClick(od, xpos, 0);
- assertEquals(od.getBoxX(),
- (lastHidden + 1) * scalew * av.getCharWidth());
- assertEquals(od.getBoxY(), 0);
- assertEquals(od.getBoxWidth(), boxWidth);
- assertEquals(od.getBoxHeight(), boxHeight);
- assertEquals(od.getScrollCol(),
- Math.round(xpos * alwidth / od.getWidth()));
- assertEquals(od.getScrollRow(), 0);*/
+ // boxX and scrollCol at left of hidden area, box width extends across
+ // hidden region
+ xpos = 50;
+ mouseClick(od, xpos, 0);
+ assertEquals(od.getBoxX(),
+ Math.round((float) (firstHidden - 1) * od.getWidth() / alwidth));
+ assertEquals(od.getBoxY(), 0);
+ assertEquals(
+ od.getBoxWidth(),
+ boxWidth
+ + Math.round((float) (lastHidden - firstHidden + 1)
+ * od.getWidth() / alwidth));
+ assertEquals(od.getBoxHeight(), boxHeight);
+ assertEquals(od.getScrollCol(), firstHidden - 1);
+ assertEquals(od.getScrollRow(), 0);