public int printUnwrapped(Graphics pg, int pwidth, int pheight, int pi)\r
throws PrinterException\r
{\r
- int idWidth = calculateIdWidth().width + 4;\r
+ int idWidth = getVisibleIdWidth();\r
FontMetrics fm = getFontMetrics(av.getFont());\r
int scaleHeight = av.charHeight + fm.getDescent();\r
\r
/// How many sequences and residues can we fit on a printable page?\r
int totalRes = (pwidth - idWidth) / av.getCharWidth();\r
\r
+ System.out.println(totalRes);\r
+\r
int totalSeq = (int) ( (pheight - scaleHeight) / av.getCharHeight()) -\r
1;\r
\r
+ hgap\r
+ annotationHeight;\r
\r
- int idWidth = calculateIdWidth().width + 4;\r
+ int idWidth = getVisibleIdWidth();\r
\r
int maxwidth = av.alignment.getWidth();\r
if (av.hasHiddenColumns)\r
}\r
}\r
\r
+ int getVisibleIdWidth()\r
+ {\r
+ return\r
+ idPanel.getWidth() > 0 ? idPanel.getWidth() :\r
+ calculateIdWidth().width + 4;\r
+ }\r
+\r
void makeAlignmentImage(int type, File file)\r
{\r
int maxwidth = av.alignment.getWidth();\r
maxwidth = av.getColumnSelection().findColumnPosition(maxwidth);\r
\r
int height = ( (av.alignment.getHeight() + 1) * av.charHeight) + 30;\r
- int width = idPanel.getWidth() + (maxwidth * av.charWidth);\r
- if (idPanel.getWidth() == 0)\r
- {\r
- width += calculateIdWidth().getWidth() + 4;\r
- }\r
+ int width = getVisibleIdWidth() + (maxwidth * av.charWidth);\r
\r
if (av.getWrapAlignment())\r
{\r
width = alignFrame.getWidth() - 22;\r
}\r
else\r
- width = seqPanel.getWidth() + idPanel.getWidth();\r
+ width = seqPanel.getWidth() + getVisibleIdWidth();\r
\r
}\r
else if (av.getShowAnnotation())\r
{\r
///////ONLY WORKS WITH NONE WRAPPED ALIGNMENTS\r
//////////////////////////////////////////////\r
- int idWidth = calculateIdWidth().width + 4;\r
+ int idWidth = getVisibleIdWidth();\r
FontMetrics fm = getFontMetrics(av.getFont());\r
int scaleHeight = av.charHeight + fm.getDescent();\r
\r
if (System.getProperty("java.awt.headless") != null\r
&& System.getProperty("java.awt.headless").equals("true"))\r
{\r
- int idWidth = calculateIdWidth().width + 4;\r
- seqPanelWidth = alignFrame.getWidth() - idWidth;\r
+ seqPanelWidth = alignFrame.getWidth() - getVisibleIdWidth();\r
}\r
\r
int chunkWidth = seqPanel.seqCanvas.getWrappedCanvasWidth(\r