cut and paste now in main menu
authoramwaterhouse <Andrew Waterhouse>
Thu, 10 Feb 2005 17:54:13 +0000 (17:54 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 10 Feb 2005 17:54:13 +0000 (17:54 +0000)
src/jalview/gui/PopupMenu.java

index a1007bb..38c3250 100755 (executable)
@@ -11,9 +11,6 @@ import MCview.*;
 public class PopupMenu extends JPopupMenu\r
 {\r
   JMenu groupMenu = new JMenu();\r
-  JMenuItem copyGroup = new JMenuItem();\r
-  JMenuItem moveGroup = new JMenuItem();\r
-  JMenuItem deleteSequences = new JMenuItem();\r
   JMenuItem analyze = new JMenuItem();\r
   JMenu defineMenu = new JMenu();\r
   JMenuItem groupName = new JMenuItem();\r
@@ -119,30 +116,6 @@ public class PopupMenu extends JPopupMenu
   private void jbInit() throws Exception\r
   {\r
     groupMenu.setText("Group");\r
-    copyGroup.setText("Copy region to new Alignment");\r
-    copyGroup.addActionListener(new java.awt.event.ActionListener()\r
-    {\r
-      public void actionPerformed(ActionEvent e)\r
-      {\r
-        copyGroup_actionPerformed(e);\r
-      }\r
-    });\r
-    moveGroup.setText("Move sequences to new Alignment");\r
-    moveGroup.addActionListener(new java.awt.event.ActionListener()\r
-    {\r
-      public void actionPerformed(ActionEvent e)\r
-      {\r
-        moveGroup_actionPerformed(e);\r
-      }\r
-    });\r
-    deleteSequences.setText("Delete sequences");\r
-    deleteSequences.addActionListener(new java.awt.event.ActionListener()\r
-    {\r
-      public void actionPerformed(ActionEvent e)\r
-      {\r
-        deleteSequences_actionPerformed(e);\r
-      }\r
-    });\r
     analyze.setText("Analyze");\r
     analyze.addActionListener(new java.awt.event.ActionListener()\r
     {\r
@@ -202,10 +175,6 @@ public class PopupMenu extends JPopupMenu
     groupMenu.add(defineMenu);\r
     groupMenu.add(unGroupMenuItem);\r
     groupMenu.addSeparator();\r
-    groupMenu.add(copyGroup);\r
-    groupMenu.add(moveGroup);\r
-    groupMenu.add(deleteSequences);\r
-    groupMenu.addSeparator();\r
     groupMenu.add(analyze);\r
     defineMenu.add(groupName);\r
     defineMenu.add(groupAnnotation);\r
@@ -492,60 +461,6 @@ public class PopupMenu extends JPopupMenu
     groupName.setText(reply);\r
   }\r
 \r
-  protected void copyGroup_actionPerformed(ActionEvent e)\r
-  {\r
-    SequenceGroup sg = ap.av.getRubberbandGroup();\r
-\r
-    SequenceI[] s = new Sequence[sg.sequences.size()];\r
-     for (int i=0; i < sg.sequences.size(); i++)\r
-     {\r
-       s[i] = new Sequence( sg.getSequenceAt(i));\r
-       s[i].setSequence( s[i].getSequence(sg.getStartRes(), sg.getEndRes()+1) );\r
-     }\r
-     AlignFrame af = new AlignFrame(new Alignment(s));\r
-     int newHeight = s.length * af.viewport.getCharHeight() + 200;\r
-     if (newHeight > 500)\r
-       newHeight = 500;\r
-     Desktop.addInternalFrame(af, "Copied sequences", 700, newHeight);\r
-   }\r
-\r
-  protected  void moveGroup_actionPerformed(ActionEvent e)\r
-  {\r
-    SequenceGroup sg = ap.av.getRubberbandGroup();\r
-\r
-    SequenceI[] s = new Sequence[sg.sequences.size()];\r
-\r
-     for (int i=0; i < sg.sequences.size(); i++)\r
-       s[i] = new Sequence( sg.getSequenceAt(i));\r
-\r
-     AlignFrame af = new AlignFrame(new Alignment(s));\r
-     int newHeight = s.length * af.viewport.getCharHeight() + 200;\r
-     if(newHeight>500)\r
-       newHeight=500;\r
-     Desktop.addInternalFrame(af, "Copied sequences", 700,newHeight);\r
-\r
-\r
-     for (int i=0; i < sg.sequences.size(); i++)\r
-       ap.av.alignment.deleteSequence(sg.getSequenceAt(i));\r
-\r
-\r
-     ap.av.resetSeqLimits(ap.seqPanel.seqCanvas.getHeight());\r
-     ap.RefreshPanels();\r
-\r
-\r
-  }\r
-\r
-  protected void deleteSequences_actionPerformed(ActionEvent e)\r
-  {\r
-    SequenceGroup sg = ap.av.getRubberbandGroup();\r
-    for (int i=0;i < sg.sequences.size(); i++)\r
-            ap.av.getAlignment().deleteSequence(sg.getSequenceAt(i));\r
-\r
-    ap.av.alignment.deleteGroup(sg);\r
-    ap.av.resetSeqLimits(ap.seqPanel.seqCanvas.getHeight());\r
-    ap.RefreshPanels();\r
-\r
-  }\r
 \r
   protected void analyze_actionPerformed(ActionEvent e)\r
   {\r