*/
newap.av.replaceMappings(viewport.getAlignment());
+ /*
+ * start up cDNA consensus (if applicable) now mappings are in place
+ */
+ if (newap.av.initComplementConsensus())
+ {
+ newap.refresh(true); // adjust layout of annotations
+ }
+
newap.av.viewName = getNewViewName(viewTitle);
addAlignmentPanel(newap, true);
{
return this.dontScrollComplement;
}
+
+ /**
+ * Redraw sensibly.
+ *
+ * @adjustHeight if true, try to recalculate panel height for visible
+ * annotations
+ */
+ protected void refresh(boolean adjustHeight)
+ {
+ validateAnnotationDimensions(adjustHeight);
+ addNotify();
+ if (adjustHeight)
+ {
+ // sort, repaint, update overview
+ paintAlignment(true);
+ }
+ else
+ {
+ // lightweight repaint
+ repaint();
+ }
+ }
}
aa[selectedRow].scaleColLabel = !aa[selectedRow].scaleColLabel;
}
- refresh(fullRepaint);
+ ap.refresh(fullRepaint);
}
/**
- * Redraw sensibly.
- *
- * @adjustHeight if true, try to recalculate panel height for visible
- * annotations
- */
- protected void refresh(boolean adjustHeight)
- {
- ap.validateAnnotationDimensions(adjustHeight);
- ap.addNotify();
- if (adjustHeight)
- {
- // sort, repaint, update overview
- ap.paintAlignment(true);
- }
- else
- {
- // lightweight repaint
- ap.repaint();
- }
- }
-
- /**
* DOCUMENT ME!
*
* @param e
// ann.visible = false;
// }
// }
- refresh(true);
+ ap.refresh(true);
}
});
pop.add(hideType);
}
/**
- * If this is a protein alignment and there are mappings to cDNA, add the cDNA
- * consensus annotation.
+ * If this is a protein alignment and there are mappings to cDNA, adds the
+ * cDNA consensus annotation and returns true, else returns false.
*/
- public void initComplementConsensus()
+ public boolean initComplementConsensus()
{
if (!alignment.isNucleotide())
{
"PID for cDNA", new Annotation[1], 0f, 100f,
AlignmentAnnotation.BAR_GRAPH);
initConsensus(complementConsensus);
+ return true;
}
}
}
+ return false;
}
private void initConsensus(AlignmentAnnotation aa)