paste the clipboard contents to a text editor, you will see
the format of the copied residues FASTA.
</em></li>
+ <li><strong>Copy Highlighted region (Control Shift
+ C)</strong><br> <em>Copies each stretch of highlighted
+ residues as a new sequence on the system clipboard - you can
+ also do this by pressing <CTRL> <SHIFT> and C
+ (<APPLE> <SHIFT> and C on MacOSX). <br>Use
+ this when you want to extract sequence regions highlighted
+ as a result of a Find operation, or due to mouseovers or
+ selections made in other views such as an assocated 3D
+ structure viewer.
+ </em></li>
<li><strong>Paste </strong>
<ul>
<li><strong>To New Alignment (Control Shift V)<br>
and C on MacOSX). <br> If you try to paste the clipboard
contents to a text editor, you will see the format of the copied
residues FASTA.
+ </em></li>
+ <li><strong>Copy Highlighted region (Control Shift C)</strong><br> <em>Copies
+ each stretch of highlighted residues as a new sequence on the
+ system clipboard - you can also do this by pressing <CTRL>
+ <SHIFT> and C (<APPLE> <SHIFT> and C on
+ MacOSX). <br>Use this when you want to extract sequence regions
+ highlighted as a result of a Find operation, or due to
+ mouseovers or selections made in other views such as an
+ assocated 3D structure viewer.
</em></li>
<li><strong>Paste </strong>
<ul>
*/
package jalview.gui;
-import java.util.Locale;
-
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
+import java.util.Locale;
import java.util.Vector;
import javax.swing.ButtonGroup;
| ActionEvent.CTRL_MASK)) != 0);
}
+ @Override
+ protected void copyHighlightedColumns_actionPerformed(
+ ActionEvent actionEvent)
+ {
+ avc.copyHighlightedRegionsToClipboard();
+ }
+
/**
* Rebuilds the Colour menu, including any user-defined colours which have
* been loaded either on startup or during the session
*/
package jalview.jbgui;
-import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
-import jalview.analysis.GeneticCodeI;
-import jalview.analysis.GeneticCodes;
-import jalview.api.SplitContainerI;
-import jalview.bin.Cache;
-import jalview.gui.JvSwingUtils;
-import jalview.gui.Preferences;
-import jalview.io.FileFormats;
-import jalview.schemes.ResidueColourScheme;
-import jalview.util.MessageManager;
-import jalview.util.Platform;
-
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridLayout;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
+import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
+import jalview.analysis.GeneticCodeI;
+import jalview.analysis.GeneticCodes;
+import jalview.api.SplitContainerI;
+import jalview.bin.Cache;
+import jalview.gui.JvSwingUtils;
+import jalview.gui.Preferences;
+import jalview.io.FileFormats;
+import jalview.schemes.ResidueColourScheme;
+import jalview.util.MessageManager;
+import jalview.util.Platform;
+
@SuppressWarnings("serial")
public class GAlignFrame extends JInternalFrame
{
JMenuItem copy = new JMenuItem();
+ JMenuItem copyHighlighted = new JMenuItem();
+
JMenuItem cut = new JMenuItem();
JMenu pasteMenu = new JMenu();
}
};
selectHighlighted.addActionListener(al);
+
+ copyHighlighted = new JMenuItem(
+ MessageManager.getString("action.copy_highlighted_regions"));
+ keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
+ jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
+ + jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
+ false);
+ copyHighlighted.setToolTipText(
+ MessageManager.getString("tooltip.copy_highlighted_regions"));
+ al = new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent actionEvent)
+ {
+ copyHighlightedColumns_actionPerformed(actionEvent);
+ }
+ };
+ addMenuActionAndAccelerator(keyStroke, copyHighlighted, al);
+ copyHighlighted.addActionListener(al);
+
JMenu tooltipSettingsMenu = new JMenu(
MessageManager.getString("label.sequence_id_tooltip"));
JMenu autoAnnMenu = new JMenu(
editMenu.add(redoMenuItem);
editMenu.add(cut);
editMenu.add(copy);
+ editMenu.add(copyHighlighted);
editMenu.add(pasteMenu);
editMenu.add(delete);
editMenu.addSeparator();
// selectMenu.add(listenToViewSelections);
}
+ protected void copyHighlightedColumns_actionPerformed(
+ ActionEvent actionEvent)
+ {
+
+ }
+
protected void loadVcf_actionPerformed()
{
}