int vextent = 0;
- public void setScrollValues(int x, int y)
+ public void setScrollValues(int xpos, int ypos)
{
+ int x = xpos;
+ int y = ypos;
+
if (av.getWrapAlignment())
{
setScrollingForWrappedPanel(x);
}
else
{
-
int width = av.getAlignment().getWidth();
int height = av.getAlignment().getHeight();
}
}
+ /**
+ * Respond to adjustment event when horizontal or vertical scrollbar is
+ * changed
+ *
+ * @param evt
+ * adjustment event encoding whether apvscroll, hscroll or vscroll
+ * changed
+ */
@Override
public void adjustmentValueChanged(AdjustmentEvent evt)
{
this.scrollComplementaryPanel = b;
}
+ /**
+ * Get whether to scroll complement panel
+ *
+ * @return true if cDNA/protein complement panels should be scrolled
+ */
protected boolean isSetToScrollComplementPanel()
{
return this.scrollComplementaryPanel;
}
int start = r[0];
int end = r[1];
- // DEBUG
- // System.err.println(this.av.viewName + " Seq : " + seqIndex
- // + " Scroll to " + start + "," + end);
/*
* To centre results, scroll to positions half the visible width
*/
seqIndex = Math.max(0, seqIndex - verticalOffset);
- // System.out.println("start=" + start + ", end=" + end + ", startv="
- // + av.getStartRes() + ", endv=" + av.getEndRes() + ", starts="
- // + av.getStartSeq() + ", ends=" + av.getEndSeq());
if (!av.getWrapAlignment())
{
if ((startv = vpRanges.getStartRes()) >= start)
/*
* Scroll left to make start of search results visible
*/
- // setScrollValues(start - 1, seqIndex); // plus one residue
setScrollValues(start, seqIndex);
}
else if ((endv = vpRanges.getEndRes()) <= end)
/*
* Scroll right to make end of search results visible
*/
- // setScrollValues(startv + 1 + end - endv, seqIndex); // plus one
setScrollValues(startv + end - endv, seqIndex);
}
else if ((starts = vpRanges.getStartSeq()) > seqIndex)
* visible row to scroll to
*
*/
- public void setScrollValues(int x, int y)
+ public void setScrollValues(int xpos, int ypos)
{
+ int x = xpos;
+ int y = ypos;
+
if (av == null || av.getAlignment() == null)
{
return;
}
else
{
-
int width = av.getAlignment().getWidth();
int height = av.getAlignment().getHeight();
}
/**
- * DOCUMENT ME!
+ * Respond to adjustment event when horizontal or vertical scrollbar is
+ * changed
*
* @param evt
- * DOCUMENT ME!
+ * adjustment event encoding whether hscroll or vscroll changed
*/
@Override
public void adjustmentValueChanged(AdjustmentEvent evt)
this.scrollComplementaryPanel = b;
}
+ /**
+ * Get whether to scroll complement panel
+ *
+ * @return true if cDNA/protein complement panels should be scrolled
+ */
protected boolean isSetToScrollComplementPanel()
{
return this.scrollComplementaryPanel;