JAL-281 added menu items and listeners to load from URL/Db
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Fri, 17 Nov 2017 02:24:58 +0000 (02:24 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Fri, 17 Nov 2017 02:24:58 +0000 (02:24 +0000)
src/jalview/gui/AlignFrame.java
src/jalview/jbgui/GAlignFrame.java

index fa3f489..21b602f 100644 (file)
@@ -3929,6 +3929,18 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     }
   }
 
+  @Override
+  protected void loadTreeUrlItem_actionPerformed(ActionEvent e)
+  {
+
+  }
+
+  @Override
+  protected void loadTreeDbItem_actionPerformed(ActionEvent e)
+  {
+
+  }
+
   public TreePanel showNewickTree(NewickFile nf, String treeTitle)
   {
     return showNewickTree(nf, treeTitle, 600, 500, 4, 5);
index d9eb259..4073fcc 100755 (executable)
@@ -1077,11 +1077,11 @@ public class GAlignFrame extends JInternalFrame
       }
     });
 
-    JMenuItem loadTreeMenuItem = new JMenuItem(
+    JMenuItem loadTreeFile = new JMenuItem(
             MessageManager.getString("label.from_file"));
     // loadTreeMenuItem.setActionCommand(
     // MessageManager.getString());
-    loadTreeMenuItem.addActionListener(new ActionListener()
+    loadTreeFile.addActionListener(new ActionListener()
     {
       @Override
       public void actionPerformed(ActionEvent e)
@@ -1090,6 +1090,28 @@ public class GAlignFrame extends JInternalFrame
       }
     });
 
+    JMenuItem loadTreeUrl = new JMenuItem(
+            MessageManager.getString("label.from_url"));
+    loadTreeUrl.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        loadTreeUrlItem_actionPerformed(e);
+      }
+    });
+
+    JMenuItem loadTreeDb = new JMenuItem(
+            MessageManager.getString("FIX ME"));
+    loadTreeDb.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        loadTreeDbItem_actionPerformed(e);
+      }
+    });
+
     scaleAbove.setVisible(false);
     scaleAbove.setText(MessageManager.getString("action.scale_above"));
     scaleAbove.addActionListener(new ActionListener()
@@ -1689,7 +1711,9 @@ public class GAlignFrame extends JInternalFrame
     
     JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
 
-    loadTreeMenu.add(loadTreeMenuItem);
+    loadTreeMenu.add(loadTreeFile);
+    loadTreeMenu.add(loadTreeUrl);
+    loadTreeMenu.add(loadTreeDb);
 
     alignFrameMenuBar.add(fileMenu);
     alignFrameMenuBar.add(editMenu);
@@ -2375,6 +2399,16 @@ public class GAlignFrame extends JInternalFrame
 
   }
 
+  protected void loadTreeUrlItem_actionPerformed(ActionEvent e)
+  {
+
+  }
+
+  protected void loadTreeDbItem_actionPerformed(ActionEvent e)
+  {
+
+  }
+
   /**
    * Template method to handle the 'load T-Coffee scores' menu event.
    * <p>