*/
public int adjustPanelHeight()
{
+ int height=calcPanelHeight();
+ this.setPreferredSize(new Dimension(1, height));
+ if (ap != null)
+ {
+ // revalidate only when the alignment panel is fully constructed
+ ap.validate();
+ }
+
+ return height;
+ }
+
+ /**
+ * calculate the height for visible annotation, revalidating bounds where necessary
+ * ABSTRACT GUI METHOD
+ * @return total height of annotation
+ */
+ public int calcPanelHeight()
+ {
// setHeight of panels
AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();
int height = 0;
// set minimum
height = 20;
}
-
- this.setPreferredSize(new Dimension(1, height));
- if (ap != null)
- {
- // revalidate only when the alignment panel is fully constructed
- ap.validate();
- }
-
return height;
}