*/
package jalview.gui;
+import jalview.analysis.AnnotationSorter;
import jalview.api.AlignmentViewPanel;
import jalview.bin.Cache;
import jalview.datamodel.AlignmentI;
* Creates a new AlignmentPanel object.
*
* @param af
- * DOCUMENT ME!
* @param av
- * DOCUMENT ME!
*/
public AlignmentPanel(AlignFrame af, final AlignViewport av)
{
*/
public void adjustmentValueChanged(AdjustmentEvent evt)
{
-
int oldX = av.getStartRes();
int oldY = av.getStartSeq();
}
}
+ /**
+ * Repaint the alignment including the annotations and overview panels (if
+ * shown).
+ */
public void paintAlignment(boolean updateOverview)
{
+ final AnnotationSorter sorter = new AnnotationSorter(getAlignment(),
+ av.isShowAutocalculatedAbove());
+ sorter.sort(getAlignment()
+ .getAlignmentAnnotation(),
+ av.getSortAnnotationsBy());
repaint();
if (updateOverview)
if (alignFrame != null && !headless)
{
alignFrame.setProgressBar(MessageManager.formatMessage(
- "status.saving_file",
- new String[]
+ "status.saving_file", new Object[]
{ type.getLabel() }), progress);
}
try
.getStructureSelectionManager();
ssm.removeStructureViewerListener(seqPanel, null);
ssm.removeSelectionListener(seqPanel);
+ ssm.removeEditListener(av);
av.setAlignment(null);
av = null;
}
return av.getAlignment();
}
- /**
- * get the name for this view
- *
- * @return
- */
+
+ @Override
public String getViewName()
{
return av.viewName;