// height of box
private int boxHeight = -1;
- // scroll position in viewport corresponding to boxX
- private int scrollCol = -1;
-
- // scroll position in viewport corresponding to boxY
- private int scrollRow = -1;
-
/**
* Create an OverviewDimensions object
*
// went past the end of the alignment, adjust backwards
// if last position was before the end of the alignment, need to update
- if ((scrollCol + vpwidth - 1) < visAlignWidth)
+ if ((ranges.getStartRes() + vpwidth - 1) < visAlignWidth)
{
visXAsRes = hiddenCols.findColumnPosition(hiddenCols
.subtractVisibleColumns(vpwidth - 1, alwidth - 1));
}
else
{
- visXAsRes = scrollCol;
+ visXAsRes = ranges.getStartRes();
}
}
if (visYAsRes + vpheight - 1 > visAlignHeight)
{
// went past the end of the alignment, adjust backwards
- if ((scrollRow + vpheight - 1) < visAlignHeight)
+ if ((ranges.getEndRes() + vpheight - 1) < visAlignHeight)
{
visYAsRes = hiddenSeqs.findIndexWithoutHiddenSeqs(hiddenSeqs
.subtractVisibleRows(vpheight - 1, alheight - 1));
}
else
{
- visYAsRes = scrollRow;
+ visYAsRes = ranges.getEndRes();
}
}
- // update scroll values
- // scrollCol = visXAsRes;
- // scrollRow = visYAsRes;
+ // update viewport
ranges.setStartRes(visXAsRes);
-
ranges.setStartSeq(visYAsRes);
}
*/
public void drawBox(Graphics g)
{
+ System.out.println("Drawbox: " + boxX + " " + boxY + " " + boxWidth
+ + " " + boxHeight);
g.drawRect(boxX, boxY, boxWidth, boxHeight);
g.drawRect(boxX + 1, boxY + 1, boxWidth - 2, boxHeight - 2);
}
- /*public int getScrollCol()
- {
- return scrollCol;
- }
-
- public int getScrollRow()
- {
- return scrollRow;
- }*/
-
// TODO should be removed, when unit test has mock Graphics object available
// to check boxX/boxY
public int getBoxX()