+ * calculate the minimum ratio that leaves at least
+ * two sequences visible in the top panel
+ */
+ int topPanelHeight = topFrame.getHeight();
+ int topSequencesHeight = topFrame.alignPanel.getSeqPanel().seqCanvas
+ .getHeight();
+ int topPanelMinHeight = topPanelHeight
+ - Math.max(0,
+ topSequencesHeight - 2 * topViewport.getCharHeight());
+ int myHeight = getHeight();
+ double minRatio = topPanelMinHeight / (double) myHeight;
+
+ /*
+ * calculate the maximum ratio that leaves at least
+ * two sequences visible in the bottom panel
+ */
+ int bottomPanelHeight = bottomFrame.getHeight();
+ int bottomSequencesHeight = bottomFrame.alignPanel.getSeqPanel().seqCanvas
+ .getHeight();
+ int bottomPanelMinHeight = bottomPanelHeight
+ - Math.max(
+ 0,
+ bottomSequencesHeight - 2
+ * bottomViewport.getCharHeight());
+ double maxRatio = (myHeight - bottomPanelMinHeight) / (double) myHeight;
+
+ /*