import jalview.analysis.AnnotationSorter;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
+import jalview.api.SequenceRenderer;
import jalview.bin.Cache;
import jalview.bin.Jalview;
import jalview.datamodel.AlignmentI;
*/
public AlignmentPanel(AlignFrame af, final AlignViewport av)
{
-// setBackground(Color.white); // BH 2019
+ setBackground(Color.white); // BH 2019
+ setOpaque(true);
alignFrame = af;
this.av = av;
setSeqPanel(new SeqPanel(av, this));
// Note in JComponent:
// This method is called by the toolkit internally and should
// not be called directly by programs.
+ // I note that addNotify() is called in several areas of Jalview.
int annotationHeight = getAnnotationPanel().adjustPanelHeight();
annotationHeight = getAnnotationPanel()
public int getVisibleIdWidth(boolean onscreen)
{
// see if rendering offscreen - check preferences and calc width accordingly
- if (!onscreen && Cache.getDefault("FIGURE_AUTOIDWIDTH", false))
+ if (!onscreen && Cache.getDefault(Preferences.FIGURE_AUTOIDWIDTH, false))
{
return calculateIdWidth(-1).width + 4;
}
Integer idwidth = null;
if (onscreen || (idwidth = Cache
- .getIntegerProperty("FIGURE_FIXEDIDWIDTH")) == null)
+ .getIntegerProperty(Preferences.FIGURE_FIXEDIDWIDTH)) == null)
{
int w = getIdPanel().getWidth();
return (w > 0 ? w : calculateIdWidth().width + 4);
{
int seqPanelWidth = getSeqPanel().seqCanvas.getWidth();
- if (System.getProperty("java.awt.headless") != null
- && System.getProperty("java.awt.headless").equals("true"))
+ if (Jalview.isHeadlessMode())
{
seqPanelWidth = alignFrame.getWidth() - getVisibleIdWidth()
- vscroll.getPreferredSize().width
return calculationDialog;
}
+ @Override
+ public SequenceRenderer getSequenceRenderer()
+ {
+ return seqPanel.seqCanvas.getSequenceRenderer();
+ }
+
}