AlignViewport av;\r
boolean displaySearch = false;\r
int[] searchResults = null;\r
- int chunkHeight;\r
- int chunkWidth;\r
boolean fastPaint = false;\r
int LABEL_WEST;\r
int LABEL_EAST;\r
gg.setColor(Color.white);\r
gg.fillRect(0, 0, imgWidth, imgHeight);\r
\r
- chunkWidth = getWrappedCanvasWidth(getWidth());\r
- chunkHeight = (av.getAlignment().getHeight() + 2) * av.charHeight;\r
-\r
- av.setChunkHeight(chunkHeight);\r
- av.setChunkWidth(chunkWidth);\r
\r
if (av.getWrapAlignment())\r
{\r
LABEL_WEST = fm.stringWidth(getMask());\r
}\r
\r
+ int hgap = av.charHeight;\r
+ if(av.scaleAboveWrapped)\r
+ hgap += av.charHeight;\r
+\r
int cWidth = (canvasWidth - LABEL_EAST - LABEL_WEST) / av.charWidth;\r
- int cHeight = (av.getAlignment().getHeight() + 2) * av.charHeight;\r
+ int cHeight = av.getAlignment().getHeight() * av.charHeight;\r
+\r
+ av.setWrappedWidth(cWidth);\r
\r
av.endRes = av.startRes + cWidth;\r
\r
+\r
int endx = (startRes + cWidth) - 1;\r
- int ypos = 2 * av.charHeight;\r
+ int ypos = hgap;\r
+\r
\r
while ((ypos <= canvasHeight) && (startRes < av.alignment.getWidth()))\r
{\r
\r
\r
drawPanel(g, startRes, endx, 0, al.getHeight(), startRes, 0, ypos);\r
+\r
+ if(av.showAnnotation)\r
+ {\r
+ g.translate(0, cHeight + ypos + 3);\r
+ if(annotations==null)\r
+ annotations = new AnnotationPanel(av);\r
+\r
+ annotations.drawComponent( (Graphics2D) g, startRes, endx + 1);\r
+ g.translate(0, -cHeight - ypos);\r
+ }\r
g.setClip(clip);\r
g.translate(-LABEL_WEST, 0);\r
\r
- ypos += cHeight;\r
+ ypos += cHeight+getAnnotationHeight()+hgap;\r
+ if(av.showAnnotation)\r
+ ypos -= 3;\r
+\r
startRes += cWidth;\r
endx = (startRes + cWidth) - 1;\r
\r
}\r
}\r
\r
+ AnnotationPanel annotations;\r
+ int getAnnotationHeight()\r
+ {\r
+ if(!av.showAnnotation)\r
+ return 0;\r
+\r
+ if(annotations==null)\r
+ annotations = new AnnotationPanel(av);\r
+\r
+ return annotations.adjustPanelHeight();\r
+ }\r
+\r
/**\r
* DOCUMENT ME!\r
*\r