// this value is set false when selection area being dragged
boolean fastPaint = true;
- int hextent = 0;
+ private int hextent = 0;
- int vextent = 0;
+ private int vextent = 0;
/*
* Flag set while scrolling to follow complementary cDNA/protein scroll. When
if (res < av.getStartRes() || res >= (av.getStartRes() + cwidth))
{
vscroll.setValue((res / cwidth));
- av.startRes = vscroll.getValue() * cwidth;
+ av.setStartRes(vscroll.getValue() * cwidth);
}
}
fontChanged();
setAnnotationVisible(av.isShowAnnotation());
boolean wrap = av.getWrapAlignment();
- av.startSeq = 0;
+ av.setStartSeq(0);
scalePanelHolder.setVisible(!wrap);
hscroll.setVisible(!wrap);
idwidthAdjuster.setVisible(!wrap);
*/
public void setScrollValues(int x, int y)
{
- // System.err.println("Scroll " + this.av.viewName + " to " + x + "," + y);
if (av == null || av.getAlignment() == null)
{
return;
if (av.hasHiddenColumns())
{
+ // reset the width to exclude hidden columns
width = av.getColumnSelection().findColumnPosition(width);
}
x = 0;
}
+ // update endRes after x has (possibly) been adjusted
av.setEndRes((x + (getSeqPanel().seqCanvas.getWidth() / av
.getCharWidth())) - 1);
overviewPanel.setBoxPosition();
}
- int scrollX = av.startRes - oldX;
- int scrollY = av.startSeq - oldY;
+ int scrollX = av.getStartRes() - oldX;
+ int scrollY = av.getStartSeq() - oldY;
if (av.getWrapAlignment() || !fastPaint)
{
{
// Make sure we're not trying to draw a panel
// larger than the visible window
- if (scrollX > av.endRes - av.startRes)
+ if (scrollX > av.getEndRes() - av.getStartRes())
{
- scrollX = av.endRes - av.startRes;
+ scrollX = av.getEndRes() - av.getStartRes();
}
- else if (scrollX < av.startRes - av.endRes)
+ else if (scrollX < av.getStartRes() - av.getEndRes())
{
- scrollX = av.startRes - av.endRes;
+ scrollX = av.getStartRes() - av.getEndRes();
}
if (scrollX != 0 || scrollY != 0)