JAL-281 changed load associated tree GUI item to menu selection
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Fri, 17 Nov 2017 01:49:47 +0000 (01:49 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Fri, 17 Nov 2017 01:49:47 +0000 (01:49 +0000)
src/jalview/jbgui/GAlignFrame.java

index 86d0c85..d9eb259 100755 (executable)
@@ -199,7 +199,7 @@ public class GAlignFrame extends JInternalFrame
 
   private boolean showAutoCalculatedAbove = false;
 
-  private Map<KeyStroke, JMenuItem> accelerators = new HashMap<KeyStroke, JMenuItem>();
+  private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
 
   private SplitContainerI splitFrame;
 
@@ -1078,9 +1078,9 @@ public class GAlignFrame extends JInternalFrame
     });
 
     JMenuItem loadTreeMenuItem = new JMenuItem(
-            MessageManager.getString("label.load_associated_tree"));
-    loadTreeMenuItem.setActionCommand(
-            MessageManager.getString("label.load_tree_for_sequence_set"));
+            MessageManager.getString("label.from_file"));
+    // loadTreeMenuItem.setActionCommand(
+    // MessageManager.getString());
     loadTreeMenuItem.addActionListener(new ActionListener()
     {
       @Override
@@ -1683,7 +1683,14 @@ public class GAlignFrame extends JInternalFrame
 
     JMenu exportImageMenu = new JMenu(
             MessageManager.getString("label.export_image"));
+    JMenu loadTreeMenu = new JMenu(
+            MessageManager.getString("label.load_associated_tree"));
+    loadTreeMenu.setActionCommand("label.load_tree_for_sequence_set");
+    
     JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
+
+    loadTreeMenu.add(loadTreeMenuItem);
+
     alignFrameMenuBar.add(fileMenu);
     alignFrameMenuBar.add(editMenu);
     alignFrameMenuBar.add(selectMenu);
@@ -1708,7 +1715,7 @@ public class GAlignFrame extends JInternalFrame
     fileMenu.add(exportImageMenu);
     fileMenu.add(exportFeatures);
     fileMenu.add(exportAnnotations);
-    fileMenu.add(loadTreeMenuItem);
+    fileMenu.add(loadTreeMenu);
     fileMenu.add(associatedData);
     fileMenu.addSeparator();
     fileMenu.add(closeMenuItem);