From eac90472b9bedf5a147bf33c635492cdefc4ef23 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 14 Dec 2004 11:19:46 +0000 Subject: [PATCH] Copy, move and delete now done via Popup menu --- src/jalview/gui/AlignFrame.java | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index ab5fb17..9d0f60c 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -189,6 +189,10 @@ public class AlignFrame extends GAlignFrame alignPanel.RefreshPanels(); } + protected void modifyAlignmentMenuItem_actionPerformed(ActionEvent e) + { + viewport.groupDefiningMode = !modifyAlignmentMenuItem.isSelected(); + } public void groupsMenuItem_actionPerformed(ActionEvent e) @@ -232,40 +236,6 @@ public class AlignFrame extends GAlignFrame PaintRefresher.Refresh(null); } - public void deleteSelectedMenuItem_actionPerformed(ActionEvent e) - { - addHistoryItem("delete selection"); - - for (int i=0;i < viewport.getSelection().size(); i++) - viewport.getAlignment().deleteSequence(viewport.getSelection().sequenceAt(i)); - - viewport.getSelection().clear(); - viewport.resetSeqLimits(alignPanel.seqPanel.seqCanvas.getHeight()); - alignPanel.RefreshPanels(); - } - - public void moveSelectedMenuItem_actionPerformed(ActionEvent e) - { - copySelectedMenuItem_actionPerformed(null); - deleteSelectedMenuItem_actionPerformed(null); - alignPanel.repaint(); - } - - public void copySelectedMenuItem_actionPerformed(ActionEvent e) - { - if(viewport.getSelection().size()==0) - return; - - SequenceI[] s = new Sequence[viewport.getSelection().size()]; - for (int i=0; i < viewport.getSelection().size(); i++) { - s[i] = new Sequence(viewport.getSelection().sequenceAt(i)); - } - AlignFrame af = new AlignFrame(new Alignment(s)); - int newHeight = s.length * af.viewport.getCharHeight() + 200; - if(newHeight>500) - newHeight=500; - Desktop.addInternalFrame(af, "Copied sequences", 700,newHeight); - } public void deselectAllColumnsMenuItem_actionPerformed(ActionEvent e) { -- 1.7.10.2