Copy, move and delete now done via Popup menu
authoramwaterhouse <Andrew Waterhouse>
Tue, 14 Dec 2004 11:19:46 +0000 (11:19 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 14 Dec 2004 11:19:46 +0000 (11:19 +0000)
src/jalview/gui/AlignFrame.java

index ab5fb17..9d0f60c 100755 (executable)
@@ -189,6 +189,10 @@ public class AlignFrame extends GAlignFrame
      alignPanel.RefreshPanels();\r
   }\r
 \r
+  protected void modifyAlignmentMenuItem_actionPerformed(ActionEvent e)\r
+  {\r
+    viewport.groupDefiningMode = !modifyAlignmentMenuItem.isSelected();\r
+  }\r
 \r
 \r
   public void groupsMenuItem_actionPerformed(ActionEvent e)\r
@@ -232,40 +236,6 @@ public class AlignFrame extends GAlignFrame
     PaintRefresher.Refresh(null);\r
   }\r
 \r
-  public void deleteSelectedMenuItem_actionPerformed(ActionEvent e)\r
-  {\r
-    addHistoryItem("delete selection");\r
-\r
-    for (int i=0;i < viewport.getSelection().size(); i++)\r
-            viewport.getAlignment().deleteSequence(viewport.getSelection().sequenceAt(i));\r
-\r
-    viewport.getSelection().clear();\r
-    viewport.resetSeqLimits(alignPanel.seqPanel.seqCanvas.getHeight());\r
-    alignPanel.RefreshPanels();\r
-  }\r
-\r
-  public void moveSelectedMenuItem_actionPerformed(ActionEvent e)\r
-  {\r
-    copySelectedMenuItem_actionPerformed(null);\r
-    deleteSelectedMenuItem_actionPerformed(null);\r
-    alignPanel.repaint();\r
-  }\r
-\r
-  public void copySelectedMenuItem_actionPerformed(ActionEvent e)\r
-  {\r
-    if(viewport.getSelection().size()==0)\r
-      return;\r
-\r
-   SequenceI[] s = new Sequence[viewport.getSelection().size()];\r
-   for (int i=0; i < viewport.getSelection().size(); i++) {\r
-     s[i] = new Sequence(viewport.getSelection().sequenceAt(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
   public void deselectAllColumnsMenuItem_actionPerformed(ActionEvent e)\r
   {\r