private boolean noCalculation, noMenuBar, noStatus;
+ private boolean noAnnotation;
+
public boolean getStartCalculations()
{
return !noCalculation;
return !noStatus;
}
+ public boolean getShowAnnotation()
+ {
+ return !noAnnotation;
+ }
public static AlignFrame getCurrentAlignFrame()
{
System.out.println("CMD [nostatus] executed successfully!");
}
+ if (aparser.contains(ArgsParser.NOANNOTATION)
+ || aparser.contains(ArgsParser.NOANNOTATION2))
+ {
+ noAnnotation = true;
+ System.out.println("CMD no-annotation executed successfully!");
+ }
if (aparser.contains(ArgsParser.NOCALCULATION))
{
noCalculation = true;
System.out.println("CMD [-sortbytree] executed successfully!");
}
}
-
+
boolean doUpdateAnnotation = false;
-
- if (aparser.contains(ArgsParser.NOANNOTATION)
- || aparser.contains(ArgsParser.NOANNOTATION2))
+ /**
+ * we do this earlier in JalviewJS because of a complication with
+ * SHOWOVERVIEW
+ *
+ * For now, just fixing this in JalviewJS.
+ *
+ *
+ * @j2sIgnore
+ *
+ */
{
- af.getViewport().setShowAnnotation(false);
- if (!af.getViewport().isShowAnnotation())
+ if (aparser.contains(ArgsParser.NOANNOTATION)
+ || aparser.contains(ArgsParser.NOANNOTATION2))
{
- doUpdateAnnotation = true;
- System.out.println("CMD no-annotation executed successfully!");
+ af.getViewport().setShowAnnotation(false);
+ if (!af.getViewport().isShowAnnotation())
+ {
+ doUpdateAnnotation = true;
+ System.out
+ .println("CMD no-annotation executed successfully!");
+ }
}
}
if (aparser.contains(ArgsParser.NOSORTBYTREE))
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
+import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
viewport = new AlignViewport(al, hiddenColumns, sequenceSetId, viewId);
- alignPanel = new AlignmentPanel(this, viewport);
-
- addAlignmentPanel(alignPanel, true);
init();
}
{
viewport.hideSequence(hiddenSeqs);
}
- alignPanel = new AlignmentPanel(this, viewport);
- addAlignmentPanel(alignPanel, true);
init();
}
{
viewport = ap.av;
alignPanel = ap;
- addAlignmentPanel(ap, false);
init();
}
*/
void init()
{
-// setBackground(Color.white); // BH 2019
+ boolean newPanel = (alignPanel == null);
+ viewport.setShowAutocalculatedAbove(isShowAutoCalculatedAbove());
+ if (newPanel)
+ {
+ if (Platform.isJS())
+ {
+ // need to set this up front if NOANNOTATION is
+ // used in conjunction with SHOWOVERVIEW.
+
+ // I have not determined if this is appropriate for
+ // Jalview/Java, as it means we are setting this flag
+ // for all subsequent AlignFrames. For now, at least,
+ // I am setting it to be JalviewJS-only.
+
+ boolean showAnnotation = Jalview.getInstance().getShowAnnotation();
+ viewport.setShowAnnotation(showAnnotation);
+ }
+ alignPanel = new AlignmentPanel(this, viewport);
+ }
+ addAlignmentPanel(alignPanel, newPanel);
+
+ // setBackground(Color.white); // BH 2019
if (!Jalview.isHeadlessMode())
{
sortPairwiseMenuItem_actionPerformed(null);
}
- this.alignPanel.av
- .setShowAutocalculatedAbove(isShowAutoCalculatedAbove());
-
setMenusFromViewport(viewport);
buildSortByAnnotationScoresMenu();
calculateTree.addActionListener(new ActionListener()
switch (evt.getKeyCode())
{
- case 27: // escape key
+ case KeyEvent.VK_ESCAPE: // escape key
deselectAllSequenceMenuItem_actionPerformed(null);
break;
@Override
public void propertyChange(PropertyChangeEvent evt)
{
- // // System.out.println("Discoverer property change.");
- // if (evt.getPropertyName().equals("services"))
{
SwingUtilities.invokeLater(new Runnable()
{
import java.awt.event.AdjustmentListener;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
+import java.awt.image.BufferedImage;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.awt.print.PrinterException;
annotationScroller.setViewportView(getAnnotationPanel());
annotationSpaceFillerHolder.add(getAlabels(), BorderLayout.CENTER);
-
+ if (!av.isShowAnnotation())
+ {
+ annotationScroller.setVisible(false);
+ annotationSpaceFillerHolder.setVisible(false);
+ }
scalePanelHolder.add(getScalePanel(), BorderLayout.CENTER);
seqPanelHolder.add(getSeqPanel(), BorderLayout.CENTER);