}
// update endRes after x has (possibly) been adjusted
- vpRanges.setEndRes((x + (getSeqPanel().seqCanvas.getWidth() / av
- .getCharWidth())) - 1);
+ // vpRanges.setEndRes((x + (getSeqPanel().seqCanvas.getWidth() / av
+ // .getCharWidth())) - 1);
/*
* each scroll adjustment triggers adjustmentValueChanged, which resets the
hscroll.setValues(x, hextent, 0, width);
// setDontScrollComplement(flag);
vscroll.setValues(y, vextent, 0, height);
+
}
/**
int oldX = vpRanges.getStartRes();
int oldY = vpRanges.getStartSeq();
- if (evt.getSource() == hscroll)
+ // check for horizontal scroll with wrapped alignment
+ // as this can happen via triggered events (and we don't want to hscroll
+ // when wrapped)
+ if (evt.getSource() == hscroll && !av.getWrapAlignment())
{
int x = hscroll.getValue();
if (x == oldX)
int x = vpRanges.getStartRes();
int y = vpRanges.getStartSeq();
setScrollValues(x, y);
-
+ av.scrollComplementaryAlignment();
}
}
*/
public void setStartRes(int res)
{
+ int oldres = this.startRes;
+ setStartResInternal(res);
+ changeSupport.firePropertyChange("startres", oldres, res);
+ }
+
+ private void setStartResInternal(int res)
+ {
if (res > al.getWidth() - 1)
{
res = al.getWidth() - 1;
{
res = 0;
}
-
- int oldres = this.startRes;
this.startRes = res;
- // changeSupport.firePropertyChange("startres", oldres, res);
}
public void setStartEndRes(int startres, int endres)
{
int oldres = this.startRes;
- setStartRes(startres);
- setEndRes(endres);
+ setStartResInternal(startres);
+ setEndResInternal(endres);
changeSupport.firePropertyChange("startres", oldres, startres);
}
*/
public void setEndRes(int res)
{
+ int oldres = this.endRes;
+ setEndResInternal(res);
+
+ changeSupport.firePropertyChange("endres", oldres, res);
+ }
+
+ private void setEndResInternal(int res)
+ {
if (res >= al.getWidth())
{
res = al.getWidth() - 1;
{
res = 0;
}
- int oldres = this.endRes;
this.endRes = res;
-
- // changeSupport.firePropertyChange("endres", oldres, res);
}
/**
*/
public void setStartSeq(int seq)
{
+ int oldseq = this.startSeq;
+ setStartSeqInternal(seq);
+ changeSupport.firePropertyChange("startseq", oldseq, seq);
+ }
+
+ private void setStartSeqInternal(int seq)
+ {
if (seq > al.getHeight() - 1)
{
seq = al.getHeight() - 1;
{
seq = 0;
}
-
- int oldseq = this.startSeq;
this.startSeq = seq;
- // changeSupport.firePropertyChange("startseq", oldseq, seq);
}
public void setStartEndSeq(int startseq, int endseq)
{
int oldseq = this.startSeq;
- setStartSeq(startseq);
- setEndSeq(endseq);
+ setStartSeqInternal(startseq);
+ setEndSeqInternal(endseq);
changeSupport.firePropertyChange("startseq", oldseq, startseq);
}
*/
public void setEndSeq(int seq)
{
+ int oldseq = this.endSeq;
+ setEndSeqInternal(seq);
+ changeSupport.firePropertyChange("endseq", oldseq, seq);
+ }
+
+ private void setEndSeqInternal(int seq)
+ {
if (seq >= al.getHeight())
{
seq = al.getHeight() - 1;
{
seq = 0;
}
- int oldseq = this.endSeq;
this.endSeq = seq;
-
- // changeSupport.firePropertyChange("endseq", oldseq, seq);
}
/**