// set idCanvas bufferedImage to null
// to prevent drawing old image
FontMetrics fm = getFontMetrics(av.getFont());
+
+ // update the flag controlling whether the grid is too small to render the font
+ av.validCharWidth = fm.charWidth('M') <= av.getCharWidth();
scalePanelHolder.setPreferredSize(
new Dimension(10, av.getCharHeight() + fm.getDescent()));
return calculationDialog;
}
+ /**
+ * Constructs and sets the title for the Overview window (if there is one),
+ * including the align frame's title, and view name (if applicable). Returns
+ * the title, or null if this panel has no Overview window open.
+ *
+ * @param alignFrame
+ * @return
+ */
+ public String setOverviewTitle(AlignFrame alignFrame)
+ {
+ if (this.overviewPanel == null)
+ {
+ return null;
+ }
+ String overviewTitle = MessageManager
+ .formatMessage("label.overview_params", new Object[]
+ { alignFrame.getTitle() });
+ String viewName = getViewName();
+ if (viewName != null)
+ {
+ overviewTitle += (" " + viewName);
+ }
+ overviewPanel.setTitle(overviewTitle);
+ return overviewTitle;
+ }
+
+ /**
+ * If this alignment panel has an Overview panel open, closes it
+ */
+ public void closeOverviewPanel()
+ {
+ if (overviewPanel != null)
+ {
+ overviewPanel.close();
+ overviewPanel = null;
+ }
+ }
+
}