AnnotationPanel annotationPanel;\r
AnnotationLabels alabels;\r
\r
+ // this value is set false when selection area being dragged\r
+ boolean fastPaint = true;\r
+\r
public AlignmentPanel(AlignFrame af, final AlignViewport av)\r
{\r
alignFrame = af;\r
{\r
if(vscroll.getValue()<1)\r
return false;\r
+ fastPaint = false;\r
vscroll.setValue(vscroll.getValue() - 1);\r
}\r
else\r
{\r
if(vextent+vscroll.getValue() >= av.getAlignment().getHeight())\r
return false;\r
+ fastPaint = false;\r
vscroll.setValue(vscroll.getValue() + 1);\r
}\r
+ fastPaint = true;\r
return true;\r
}\r
\r
public boolean scrollRight(boolean right)\r
{\r
- if(right)\r
- {\r
- if(hscroll.getValue()<1)\r
- return false;\r
- hscroll.setValue(hscroll.getValue() - 1);\r
- }\r
- else\r
- {\r
- if(hextent+hscroll.getValue() >= av.getAlignment().getWidth())\r
- return false;\r
- hscroll.setValue(hscroll.getValue() + 1);\r
- }\r
\r
- return true;\r
- }\r
+ if (right)\r
+ {\r
+ if (hscroll.getValue() < 1)\r
+ return false;\r
+ fastPaint = false;\r
+ hscroll.setValue(hscroll.getValue() - 1);\r
+ }\r
+ else\r
+ {\r
+ if (hextent + hscroll.getValue() >= av.getAlignment().getWidth())\r
+ return false;\r
+ fastPaint = false;\r
+ hscroll.setValue(hscroll.getValue() + 1);\r
+ }\r
+ fastPaint = true;\r
+ return true;\r
+ }\r
\r
\r
public void setScrollValues(int x, int y)\r
if(overviewPanel!=null)\r
overviewPanel.setBoxPosition();\r
\r
- if(av.getWrapAlignment())\r
+ if(av.getWrapAlignment() || !fastPaint)\r
repaint();\r
else\r
{\r