*/\r
public void setScrollValues(int x, int y)\r
{\r
- av.setEndRes( (x + (seqPanel.seqCanvas.getWidth() / av.getCharWidth())) -\r
- 1);\r
+\r
+ int width = av.alignment.getWidth();\r
+ int height = av.alignment.getHeight();\r
+\r
+ if(av.hasHiddenColumns)\r
+ width = av.getColumnSelection().findColumnPosition(width);\r
+\r
+ av.setEndRes( (x + (seqPanel.seqCanvas.getWidth() / av.charWidth)) -1);\r
\r
hextent = seqPanel.seqCanvas.getWidth() / av.charWidth;\r
vextent = seqPanel.seqCanvas.getHeight() / av.charHeight;\r
\r
- if (hextent > av.alignment.getWidth())\r
+ if (hextent > width)\r
{\r
- hextent = av.alignment.getWidth();\r
+ hextent = width;\r
}\r
\r
- if (vextent > av.alignment.getHeight())\r
+ if (vextent > height)\r
{\r
- vextent = av.alignment.getHeight();\r
+ vextent = height;\r
}\r
\r
- if ( (hextent + x) > av.getAlignment().getWidth())\r
+ if ( (hextent + x) > width)\r
{\r
- x = av.getAlignment().getWidth() - hextent;\r
+ x = width - hextent;\r
}\r
\r
- if ( (vextent + y) > av.getAlignment().getHeight())\r
+ if ( (vextent + y) > height)\r
{\r
- y = av.getAlignment().getHeight() - vextent;\r
+ y = height - vextent;\r
}\r
\r
if (y < 0)\r
x = 0;\r
}\r
\r
- hscroll.setValues(x, hextent, 0, av.getAlignment().getWidth());\r
- vscroll.setValues(y, vextent, 0, av.getAlignment().getHeight());\r
+ hscroll.setValues(x, hextent, 0, width);\r
+ vscroll.setValues(y, vextent, 0, height);\r
}\r
\r
/**\r
*/\r
public void adjustmentValueChanged(AdjustmentEvent evt)\r
{\r
-\r
int oldX = av.getStartRes();\r
int oldY = av.getStartSeq();\r
\r
{\r
int max = av.alignment.getWidth() /\r
seqPanel.seqCanvas.getWrappedCanvasWidth(seqPanel.seqCanvas.getWidth()) +1;\r
+\r
+\r
vscroll.setMaximum(max);\r
vscroll.setUnitIncrement(1);\r
vscroll.setVisibleAmount(1);\r
setScrollValues(av.getStartRes(), av.getStartSeq());\r
}\r
\r
-\r
- if( this.getVisibleRect().getBounds() == g.getClipBounds() )\r
- {\r
- if (overviewPanel != null)\r
+ if( this.getVisibleRect().getBounds() == g.getClipBounds()\r
+ && overviewPanel != null)\r
overviewPanel.updateOverviewImage();\r
- }\r
+\r
}\r
\r
/**\r