From 8c0db65da2a81d3cae2bb5cbde02b1af407061b8 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 14 Nov 2019 14:25:45 +0000 Subject: [PATCH] JAL-3199 promote sortAnnotations to AlignmentViewPanel --- src/jalview/api/AlignmentViewPanel.java | 7 +++++++ src/jalview/appletgui/AlignmentPanel.java | 5 +++++ src/jalview/gui/AlignmentPanel.java | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/jalview/api/AlignmentViewPanel.java b/src/jalview/api/AlignmentViewPanel.java index 0b1ca21..8918944 100644 --- a/src/jalview/api/AlignmentViewPanel.java +++ b/src/jalview/api/AlignmentViewPanel.java @@ -63,4 +63,11 @@ public interface AlignmentViewPanel extends OOMHandlerI * @return displayed name for the view */ String getViewName(); + + /** + * Sorts annotations according to currently selected preferences. Does nothing + * if currently set to 'Custom' (manual) ordering, so as not to trash user + * customised annotation ordering. + */ + void sortAnnotations(); } diff --git a/src/jalview/appletgui/AlignmentPanel.java b/src/jalview/appletgui/AlignmentPanel.java index e9081b0..25974d4 100644 --- a/src/jalview/appletgui/AlignmentPanel.java +++ b/src/jalview/appletgui/AlignmentPanel.java @@ -1157,4 +1157,9 @@ public class AlignmentPanel extends Panel } + @Override + public void sortAnnotations() + { + } + } diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index c606b9f..aba1e3d 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -825,7 +825,8 @@ public class AlignmentPanel extends GAlignmentPanel implements * Sorts annotations according to currently selected preferences. Does nothing * if currently set to 'Custom' (manual) ordering. */ - void sortAnnotations() + @Override + public void sortAnnotations() { SequenceAnnotationOrder sortBy = av.getSortAnnotationsBy(); if (sortBy != SequenceAnnotationOrder.CUSTOM) -- 1.7.10.2