+ public AlignmentDimension getAlignmentDimension()
+ {
+ int maxwidth = av.getAlignment().getWidth();
+ if (av.hasHiddenColumns())
+ {
+ maxwidth = av.getColumnSelection().findColumnPosition(maxwidth);
+ }
+
+ int height = ((av.getAlignment().getHeight() + 1) * av.charHeight)
+ + getScalePanel().getHeight();
+ int width = getVisibleIdWidth(false) + (maxwidth * av.charWidth);
+
+ if (av.getWrapAlignment())
+ {
+ height = getWrappedHeight();
+ if (headless)
+ {
+ // need to obtain default alignment width and then add in any
+ // additional allowance for id margin
+ // this duplicates the calculation in getWrappedHeight but adjusts for
+ // offscreen idWith
+ width = alignFrame.getWidth() - vscroll.getPreferredSize().width
+ - alignFrame.getInsets().left
+ - alignFrame.getInsets().right - getVisibleIdWidth()
+ + getVisibleIdWidth(false);
+ }
+ else
+ {
+ width = getSeqPanel().getWidth() + getVisibleIdWidth(false);
+ }
+
+ }
+ else if (av.getShowAnnotation())
+ {
+ height += getAnnotationPanel().adjustPanelHeight() + 3;
+ }
+ return new AlignmentDimension(width, height);
+
+ }
+