{\r
return false;\r
}\r
- fastPaint = false;\r
- vscroll.setValue(vscroll.getValue() - 1);\r
+ setScrollValues(hscroll.getValue(), vscroll.getValue()-1);\r
}\r
else\r
{\r
{\r
return false;\r
}\r
- fastPaint = false;\r
- vscroll.setValue(vscroll.getValue() + 1);\r
+ setScrollValues(hscroll.getValue(), vscroll.getValue()+1);\r
}\r
- fastPaint = true;\r
+ repaint();\r
return true;\r
}\r
\r
{\r
return false;\r
}\r
- fastPaint = false;\r
- hscroll.setValue(hscroll.getValue() - 1);\r
+ setScrollValues(hscroll.getValue()-1, vscroll.getValue());\r
}\r
else\r
{\r
{\r
return false;\r
}\r
- fastPaint = false;\r
- hscroll.setValue(hscroll.getValue() + 1);\r
+ setScrollValues(hscroll.getValue()+1, vscroll.getValue());\r
}\r
- fastPaint = true;\r
+\r
+ repaint();\r
return true;\r
}\r
\r
public void setScrollValues(int x, int y)\r
{\r
-\r
av.setStartRes(x);\r
av.setStartSeq(y);\r
av.setEndRes(x + seqPanel.seqCanvas.getSize().width / av.getCharWidth() - 1);\r
av.setEndSeq(endSeq);\r
hscroll.setValues(x, hextent, 0, av.getAlignment().getWidth());\r
vscroll.setValues(y, vextent, 0, av.getAlignment().getHeight());\r
-\r
}\r
\r
public void adjustmentValueChanged(AdjustmentEvent evt)\r
int oldX = av.getStartRes();\r
int oldY = av.getStartSeq();\r
\r
+\r
if (evt==null || evt.getSource() == hscroll)\r
{\r
int x = hscroll.getValue();\r
1);\r
}\r
\r
+\r
if (evt==null || evt.getSource() == vscroll)\r
{\r
int offy = vscroll.getValue();\r
{\r
repaint();\r
}\r
- else if(!seqPanel.seqCanvas.fastPaint)\r
+ else\r
{\r
// Make sure we're not trying to draw a panel\r
// larger than the visible window\r
if(scrollX>av.endRes-av.startRes)\r
- scrollX = av.endRes-av.startRes;\r
+ {\r
+ scrollX = av.endRes - av.startRes;\r
+ }\r
else if(scrollX<av.startRes-av.endRes)\r
scrollX = av.startRes - av.endRes;\r
\r
\r
public void paint(Graphics g)\r
{\r
+ invalidate();\r
Dimension d = idPanel.idCanvas.getSize();\r
idPanel.idCanvas.setSize(d.width, seqPanel.seqCanvas.getSize().height);\r
annotationSpaceFillerHolder.setSize(d.width,\r