X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGAlignFrame.java;h=9491d33c30b90cc03001a61884db502290a1e899;hb=202e77bdd4533a7cfa409eb91de58d31e3d1135f;hp=3aebcda54ec76d0bceb6e9ee25f18e6c9a7fc490;hpb=549275b6bba6105f8c3b1fff191c01643111e622;p=jalview.git diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index 3aebcda..9491d33 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -601,12 +601,9 @@ public class GAlignFrame extends JInternalFrame hideAllAnnotations_actionPerformed(true, false); } }); - SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder - .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS, - SequenceAnnotationOrder.NONE.name())); - sortAnnBySequence = new JCheckBoxMenuItem( + sortAnnBySequence = new JMenuItem( MessageManager.getString("label.sort_annotations_by_sequence")); - sortAnnByLabel = new JCheckBoxMenuItem( + sortAnnByLabel = new JMenuItem( MessageManager.getString("label.sort_annotations_by_label")); sortAnnBySequence.addActionListener(new ActionListener() @@ -615,7 +612,7 @@ public class GAlignFrame extends JInternalFrame public void actionPerformed(ActionEvent e) { setAnnotationSortOrder(SequenceAnnotationOrder.SEQUENCE_AND_LABEL); - sortAnnotations(); + sortAnnotations(false); } }); sortAnnByLabel.addActionListener(new ActionListener() @@ -624,7 +621,7 @@ public class GAlignFrame extends JInternalFrame public void actionPerformed(ActionEvent e) { setAnnotationSortOrder(SequenceAnnotationOrder.LABEL_AND_SEQUENCE); - sortAnnotations(); + sortAnnotations(false); } }); colourTextMenuItem = new JCheckBoxMenuItem( @@ -882,7 +879,7 @@ public class GAlignFrame extends JInternalFrame { if (setShowAutoCalculatedAbove(showAutoFirst.isSelected())) { - sortAnnotations(); + sortAnnotations(true); } } }); @@ -894,7 +891,7 @@ public class GAlignFrame extends JInternalFrame { if (setShowAutoCalculatedAbove(!showAutoLast.isSelected())) { - sortAnnotations(); + sortAnnotations(true); } } }); @@ -2012,11 +2009,12 @@ public class GAlignFrame extends JInternalFrame } /** - * Action on clicking sort annotations by type. + * Action on clicking sort annotations by type, or change position of + * autocalculated annotation * - * @param sortOrder + * @param autoCalcOnly */ - protected void sortAnnotations() + protected void sortAnnotations(boolean autoCalcOnly) { }