-<html>\r
-<head><title>Key Strokes</title></head>\r
-<body>\r
-<p><strong>Key Strokes</strong></p>\r
-<p>\r
-Jalview has two distinct modes of keyboard operation - in 'Normal'\r
- mode, single keystrokes (including those shown next to menu items)\r
- provide short cuts to common commands. In <a\r
- href="features/cursorMode.html">'Cursor'</a> mode (enabled by\r
- <em>F2</em>), some of these are disabled and more complex 'Compound\r
- Keystrokes' can be entered to perform precise navigation, selection\r
- and editing operations.\r
-</p>\r
-<table border="1">\r
- <tr> \r
- <td><strong>Key</strong></td>\r
- <td><strong>Which Mode</strong></td>\r
- <td><strong>Action</strong></td>\r
- </tr>\r
- <!--<tr>\r
-<td><strong>Escape</strong></td><td>Both</td>\r
-<td>The Panic button.</td></tr>\r
-<tr> -->\r
- <tr> \r
- <td><strong> Escape</strong></td>\r
- <td>Normal</td>\r
- <td>Clears the current selection region, highlighted columns and highlghted \r
- residues. </td>\r
- </tr>\r
- <tr> \r
- <td><strong>Escape</strong></td>\r
- <td>Cursor</td>\r
- <td>As in normal mode, but also cancels any partially entered commands</td>\r
- </tr>\r
- <tr> \r
- <td><strong><em>F1</em></strong></td>\r
- <td>Both</td>\r
- <td>Show Help Documentation</td>\r
- </tr>\r
- <tr> \r
- <td><strong><em>F2</em></strong></td>\r
- <td></td>\r
- <td>Toggle Cursor mode on / off</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'Z'</strong></td>\r
- <td>Both</td>\r
- <td>Undoes the last sequence edit</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'Y'</strong></td>\r
- <td>Both</td>\r
- <td>Redo the last sequence edit undone.</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Up Arrow</strong></td>\r
- <td>Normal</td>\r
- <td>Moves selected sequence(s) up the alignment</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Down Arrow</strong></td>\r
- <td>Normal</td>\r
- <td>Moves selected sequence(s) down the alignment.</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Left Arrow</strong></td>\r
- <td>Normal </td>\r
- <td>Slides selected sequence(s) left. Press Alt key to slide in cursor mode</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Right Arrow</strong></td>\r
- <td>Normal</td>\r
- <td>Slides selected sequence(s) right. Press Alt key to slide in cursor mode</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Cursor Keys<br>\r
- (Arrow Keys)</strong></td>\r
- <td>Cursor</td>\r
- <td>Move cursor around alignment</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Page Up</strong></td>\r
- <td>Both</td>\r
- <td>Scroll up the alignment view</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Page Down</strong></td>\r
- <td>Both</td>\r
- <td>Scroll down the alignment view</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'A'</strong></td>\r
- <td>Both</td>\r
- <td>Selects all sequences in the alignment</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'I'</strong></td>\r
- <td>Both </td>\r
- <td>Invert sequence selection. </td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control Alt 'I'</strong></td>\r
- <td>Both </td>\r
- <td>Invert column selection. </td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'C'</strong></td>\r
- <td>Both</td>\r
- <td>Copies the selected region into the clipboard as a Fasta format file<br> \r
- <em>nb. not available in applet, as no clipboard is available</em></td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'V'</strong></td>\r
- <td>Both</td>\r
- <td> Paste the contents of the clipboard to the current alignment window. \r
- (Alignment Window->Edit->Paste->Add to this Alignment)<br> <em>nb. if the \r
- paste is from a Jalview alignment, any sequence and alignment annotations \r
- will also be copied over.</em></td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control Shift 'V'</strong></td>\r
- <td>Both</td>\r
- <td>Paste the contents of the clipboard to a new alignment window. (Alignment \r
- Window->Edit->Paste->To New Alignment)</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'X'</strong></td>\r
- <td>Both</td>\r
- <td>Cuts the (fully) selected sequences from the alignment. \r
- <!-- not yet in this version \r
-This will not happen if only some\r
-columns are selected, you should use the <a href="features/regionHiding.html">Hide Regions feature</a> instead.-->\r
- </td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'F'</strong></td>\r
- <td>Both</td>\r
- <td>Launches the search window</td>\r
- </tr>\r
- <tr> \r
- <td><strong>H</strong></td>\r
- <td>Both</td>\r
- <td>Hides / Reveals selected columns and sequences</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'H'</strong></td>\r
- <td>Both</td>\r
- <td>Hides / Reveals selected columns</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Shift 'H'</strong></td>\r
- <td>Both</td>\r
- <td>Hides / Reveals selected sequences</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'O'</strong></td>\r
- <td>Both</td>\r
- <td>Input new alignment from file</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'S'</strong></td>\r
- <td>Both</td>\r
- <td>Save alignment with current filename and format</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control Shift 'S'</strong></td>\r
- <td>Both</td>\r
- <td>Save alignment as a new file or with a different format</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'P'</strong></td>\r
- <td>Both</td>\r
- <td>Opens the print dialog box to print the current view</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'W'</strong></td>\r
- <td>Both</td>\r
- <td>Closes the current view or the current alignment</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Backspace</strong></td>\r
- <td>Normal</td>\r
- <td>Delete the currently selected rows or columns from the alignment.</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'L'</strong></td>\r
- <td>Left</td>\r
- <td>Remove columns to left of left-most column marker.</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'R'</strong></td>\r
- <td>Both</td>\r
- <td>Remove columns to right of right-most column marker.</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'E'</strong></td>\r
- <td>Both</td>\r
- <td>Remove gapped columns</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control Shift 'E'</strong></td>\r
- <td>Both</td>\r
- <td>Remove all gaps</td>\r
- </tr>\r
- <tr> \r
- <td><strong>Control 'D'</strong></td>\r
- <td>Both</td>\r
- <td>Open the 'Remove redundancy' Dialog box.</td>\r
- </tr>\r
- <tr> \r
- <td><strong></strong></td>\r
- <td>Normal</td>\r
- <td></td>\r
- </tr>\r
-</table>\r
-<p>The compound commands available in the Cursor mode are summarised\r
-below. Single letter commands can be prefixed by digits to specify a repetition\r
-number, and some more complex commands take one or more numeric\r
-parameters (prefixing the command key and separated by commas).</p>\r
-<table border=1><tr><td><strong>Compound\r
-Command</strong></td><td>Mode</td><td>Action (and parameter description)</td></tr>\r
-<tr><td><strong>0-9</strong></td><td>Cursor</td><td>Begin entering a\r
-numeric parameter (<strong><em>p</em></strong>) or repetition number for a cursor movement or edit\r
-command.</td></tr>\r
-<tr><td><strong>,</strong></td><td>Cursor</td><td>Separates one or\r
-more numeric parameters (<em>e.g. <strong>p1</strong>,<strong>p2</strong></em>) for a command.</td></tr>\r
-<tr><td><strong><strong><em>p1</em></strong>,<strong><em>p2</em></strong><br>Return</strong></td><td>Cursor</td><td>Move cursor to a particular column (<strong><em>p1</em></strong>) and row (<strong><em>p2</em></strong>) in the alignment.<br><em>e.g. '5,6<Return>' moves the cursor to the 5th column in the 6th sequence.</em></td></tr>\r
-<tr><td><strong><em>p</em>S</strong></td><td>Cursor</td><td>Jump to the <strong><em>p</em></strong>'th sequence in the alignment.</td></tr>\r
-<tr><td><strong><em>p</em>P</strong></td><td>Cursor</td><td>Jump to <em><strong>p</strong></em>'th amino acid in current sequence.</td></tr>\r
-<tr><td><strong><em>p</em>C</strong></td><td>Cursor</td><td>Jump to <em><strong>p</strong></em>'th column in the alignment.</td></tr>\r
-<tr><td><strong>Q</strong></td><td>Cursor</td><td>Marks the top left corner of the selection area</td></tr>\r
-<tr><td><strong>M</strong></td><td>Cursor</td><td>Marks the bottom right corner of the selection area</td></tr>\r
-<tr><td><strong><em>[p]</em><br>Space</strong></td><td>Cursor</td><td>Inserts\r
-one (or optionally <strong><em>p</em></strong>) gaps at the current position.<br><em>Hold down Control or Shift to insert gaps over a sequence group</em></td></tr>\r
-<tr><td><strong><em>[p]</em><br>Delete<br></strong></td><td>Cursor</td><td>Removes\r
-one (or optionally <strong><em>p</em></strong>) gaps at the cursor position.<br><em>Hold down Control or Shift to insert gaps over a sequence group</em></td></tr>\r
-<tr><td><strong><em>[p]</em><br>Backspace<br></strong></td><td>Cursor</td><td>Removes\r
-one (or optionally <strong><em>p</em></strong>) gaps at the cursor position.<br><em>Hold down Control or Shift to insert gaps over a sequence group</em></td></tr></table>\r
-<p> </p>\r
-<p> </p>\r
-</body>\r
-</html>\r
+<html>
+<head><title>Key Strokes</title></head>
+<body>
+<p><strong>Key Strokes</strong></p>
+<p>
+Jalview has two distinct modes of keyboard operation - in 'Normal'
+ mode, single keystrokes (including those shown next to menu items)
+ provide short cuts to common commands. In <a
+ href="features/cursorMode.html">'Cursor'</a> mode (enabled by
+ <em>F2</em>), some of these are disabled and more complex 'Compound
+ Keystrokes' can be entered to perform precise navigation, selection
+ and editing operations.
+</p>
+<table border="1">
+ <tr>
+ <td><strong>Key</strong></td>
+ <td><strong>Which Mode</strong></td>
+ <td><strong>Action</strong></td>
+ </tr>
+ <!--<tr>
+<td><strong>Escape</strong></td><td>Both</td>
+<td>The Panic button.</td></tr>
+<tr> -->
+ <tr>
+ <td><strong> Escape</strong></td>
+ <td>Normal</td>
+ <td>Clears the current selection region, highlighted columns and highlghted
+ residues. </td>
+ </tr>
+ <tr>
+ <td><strong>Escape</strong></td>
+ <td>Cursor</td>
+ <td>As in normal mode, but also cancels any partially entered commands</td>
+ </tr>
+ <tr>
+ <td><strong><em>F1</em></strong></td>
+ <td>Both</td>
+ <td>Show Help Documentation</td>
+ </tr>
+ <tr>
+ <td><strong><em>F2</em></strong></td>
+ <td></td>
+ <td>Toggle Cursor mode on / off</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'Z'</strong></td>
+ <td>Both</td>
+ <td>Undoes the last sequence edit</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'Y'</strong></td>
+ <td>Both</td>
+ <td>Redo the last sequence edit undone.</td>
+ </tr>
+ <tr>
+ <td><strong>Up Arrow</strong></td>
+ <td>Normal</td>
+ <td>Moves selected sequence(s) up the alignment</td>
+ </tr>
+ <tr>
+ <td><strong>Down Arrow</strong></td>
+ <td>Normal</td>
+ <td>Moves selected sequence(s) down the alignment.</td>
+ </tr>
+ <tr>
+ <td><strong>Left Arrow</strong></td>
+ <td>Normal </td>
+ <td>Slides selected sequence(s) left. Press Alt key to slide in cursor mode</td>
+ </tr>
+ <tr>
+ <td><strong>Right Arrow</strong></td>
+ <td>Normal</td>
+ <td>Slides selected sequence(s) right. Press Alt key to slide in cursor mode</td>
+ </tr>
+ <tr>
+ <td><strong>Cursor Keys<br>
+ (Arrow Keys)</strong></td>
+ <td>Cursor</td>
+ <td>Move cursor around alignment</td>
+ </tr>
+ <tr>
+ <td><strong>Page Up</strong></td>
+ <td>Both</td>
+ <td>Scroll up the alignment view</td>
+ </tr>
+ <tr>
+ <td><strong>Page Down</strong></td>
+ <td>Both</td>
+ <td>Scroll down the alignment view</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'A'</strong></td>
+ <td>Both</td>
+ <td>Selects all sequences in the alignment</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'I'</strong></td>
+ <td>Both </td>
+ <td>Invert sequence selection. </td>
+ </tr>
+ <tr>
+ <td><strong>Control Alt 'I'</strong></td>
+ <td>Both </td>
+ <td>Invert column selection. </td>
+ </tr>
+ <tr>
+ <td><strong>Control 'C'</strong></td>
+ <td>Both</td>
+ <td>Copies the selected region into the clipboard as a Fasta format file<br>
+ <em>nb. not available in applet, as no clipboard is available</em></td>
+ </tr>
+ <tr>
+ <td><strong>Control 'V'</strong></td>
+ <td>Both</td>
+ <td> Paste the contents of the clipboard to the current alignment window.
+ (Alignment Window->Edit->Paste->Add to this Alignment)<br> <em>nb. if the
+ paste is from a Jalview alignment, any sequence and alignment annotations
+ will also be copied over.</em></td>
+ </tr>
+ <tr>
+ <td><strong>Control Shift 'V'</strong></td>
+ <td>Both</td>
+ <td>Paste the contents of the clipboard to a new alignment window. (Alignment
+ Window->Edit->Paste->To New Alignment)</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'X'</strong></td>
+ <td>Both</td>
+ <td>Cuts the (fully) selected sequences from the alignment.
+ <!-- not yet in this version
+This will not happen if only some
+columns are selected, you should use the <a href="features/regionHiding.html">Hide Regions feature</a> instead.-->
+ </td>
+ </tr>
+ <tr>
+ <td><strong>Control 'F'</strong></td>
+ <td>Both</td>
+ <td>Launches the search window</td>
+ </tr>
+ <tr>
+ <td><strong>H</strong></td>
+ <td>Both</td>
+ <td>Hides / Reveals selected columns and sequences</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'H'</strong></td>
+ <td>Both</td>
+ <td>Hides / Reveals selected columns</td>
+ </tr>
+ <tr>
+ <td><strong>Shift 'H'</strong></td>
+ <td>Both</td>
+ <td>Hides / Reveals selected sequences</td>
+ </tr>
+ <tr>
+ <td><strong>Control + Shift 'H'</strong></td>
+ <td>Both</td>
+ <td>Hides everything but the current selection</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'O'</strong></td>
+ <td>Both</td>
+ <td>Input new alignment from file</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'S'</strong></td>
+ <td>Both</td>
+ <td>Save alignment with current filename and format</td>
+ </tr>
+ <tr>
+ <td><strong>Control Shift 'S'</strong></td>
+ <td>Both</td>
+ <td>Save alignment as a new file or with a different format</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'P'</strong></td>
+ <td>Both</td>
+ <td>Opens the print dialog box to print the current view</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'W'</strong></td>
+ <td>Both</td>
+ <td>Closes the current view or the current alignment</td>
+ </tr>
+ <tr>
+ <td><strong>Backspace</strong></td>
+ <td>Normal</td>
+ <td>Delete the currently selected rows or columns from the alignment.</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'L'</strong></td>
+ <td>Left</td>
+ <td>Remove columns to left of left-most column marker.</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'R'</strong></td>
+ <td>Both</td>
+ <td>Remove columns to right of right-most column marker.</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'E'</strong></td>
+ <td>Both</td>
+ <td>Remove gapped columns</td>
+ </tr>
+ <tr>
+ <td><strong>Control Shift 'E'</strong></td>
+ <td>Both</td>
+ <td>Remove all gaps</td>
+ </tr>
+ <tr>
+ <td><strong>Control 'D'</strong></td>
+ <td>Both</td>
+ <td>Open the 'Remove redundancy' Dialog box.</td>
+ </tr>
+ <tr>
+ <td><strong></strong></td>
+ <td>Normal</td>
+ <td></td>
+ </tr>
+</table>
+<p>The compound commands available in the Cursor mode are summarised
+below. Single letter commands can be prefixed by digits to specify a repetition
+number, and some more complex commands take one or more numeric
+parameters (prefixing the command key and separated by commas).</p>
+<table border=1><tr><td><strong>Compound
+Command</strong></td><td>Mode</td><td>Action (and parameter description)</td></tr>
+<tr><td><strong>0-9</strong></td><td>Cursor</td><td>Begin entering a
+numeric parameter (<strong><em>p</em></strong>) or repetition number for a cursor movement or edit
+command.</td></tr>
+<tr><td><strong>,</strong></td><td>Cursor</td><td>Separates one or
+more numeric parameters (<em>e.g. <strong>p1</strong>,<strong>p2</strong></em>) for a command.</td></tr>
+<tr><td><strong><strong><em>p1</em></strong>,<strong><em>p2</em></strong><br>Return</strong></td><td>Cursor</td><td>Move cursor to a particular column (<strong><em>p1</em></strong>) and row (<strong><em>p2</em></strong>) in the alignment.<br><em>e.g. '5,6<Return>' moves the cursor to the 5th column in the 6th sequence.</em></td></tr>
+<tr><td><strong><em>p</em>S</strong></td><td>Cursor</td><td>Jump to the <strong><em>p</em></strong>'th sequence in the alignment.</td></tr>
+<tr><td><strong><em>p</em>P</strong></td><td>Cursor</td><td>Jump to <em><strong>p</strong></em>'th amino acid in current sequence.</td></tr>
+<tr><td><strong><em>p</em>C</strong></td><td>Cursor</td><td>Jump to <em><strong>p</strong></em>'th column in the alignment.</td></tr>
+<tr><td><strong>Q</strong></td><td>Cursor</td><td>Marks the top left corner of the selection area</td></tr>
+<tr><td><strong>M</strong></td><td>Cursor</td><td>Marks the bottom right corner of the selection area</td></tr>
+<tr><td><strong><em>[p]</em><br>Space</strong></td><td>Cursor</td><td>Inserts
+one (or optionally <strong><em>p</em></strong>) gaps at the current position.<br><em>Hold down Control or Shift to insert gaps over a sequence group</em></td></tr>
+<tr><td><strong><em>[p]</em><br>Delete<br></strong></td><td>Cursor</td><td>Removes
+one (or optionally <strong><em>p</em></strong>) gaps at the cursor position.<br><em>Hold down Control or Shift to insert gaps over a sequence group</em></td></tr>
+<tr><td><strong><em>[p]</em><br>Backspace<br></strong></td><td>Cursor</td><td>Removes
+one (or optionally <strong><em>p</em></strong>) gaps at the cursor position.<br><em>Hold down Control or Shift to insert gaps over a sequence group</em></td></tr></table>
+<p> </p>
+<p> </p>
+</body>
+</html>
<li><strong>Undefine Groups (Control U)<br>
</strong><em>The alignment will be reset with no defined groups.<br>
<strong>WARNING</strong>: This cannot be undone.</em></li>
+ <li><strong>Make Groups<br/></strong>
+ <em>The currently selected groups of the alignment will be
+ subdivided according to the contents of the currently selected region.
+ <br/>Use this to subdivide an alignment based on the
+ different combinations of residues observed at specific
+ positions. (new in jalview 2.5)</em></li>
</ul>
</li>
<li><strong>View</strong>
<li><strong>Gather Views (G)</strong><em><br>
Each view associated with the alignment will be displayed within its
own tab on the current alignment window. </em></li>
- <li><strong>Show→(all Columns / Sequences)</strong><em><br>
- All hidden Columns / Sequences will be revealed. </em></li>
- <li><strong>Hide→(all Columns / Sequences)</strong><em><br>
- Hides the all the currently selected Columns / Sequences</em></li>
+ <li><strong>Show→(all Columns / Sequences / Sequences and Columns)</strong><em><br>
+ All hidden Columns / Sequences / Sequences and Columns will be revealed. </em></li>
+ <li><strong>Hide→(all Columns / Sequences / Selected Region / All but Selected Region )</strong><em><br>
+ Hides the all the currently selected Columns / Sequences / Region or everything but the selected Region.</em></li>
<li><strong>Show Annotations<br>
</strong><em>If this is selected the "Annotation Panel" will be
displayed below the alignment. The default setting is to display the
<li><strong>Gather Views (G)</strong><em><br>
Each view associated with the alignment will be displayed within its own tab
on the current alignment window. </em></li>
- <li><strong>Show→(all Columns / Sequences)</strong><em><br>
- All hidden Columns / Sequences will be revealed. </em></li>
- <li><strong>Hide→(all Columns / Sequences)</strong><em><br>
- Hides the currently selected Columns / Sequences</em></li>
+ <li><strong>Show→(all Columns / Sequences / Sequences and Columns</strong> )</strong><em><br>
+ All hidden Columns / Sequences / Sequences and Columns will be revealed. </em></li>
+ <li><strong>Hide→(all Columns / Sequences / Selected Region / All but Selected Region)</strong><em><br>
+ Hides the currently selected Columns / Sequences / Region or everything but the selected Region.</em></li>
<li><strong>Show Annotations<br>
</strong><em>If this is selected the "Annotation Panel" will be
displayed below the alignment. The default setting is to display the conservation
<li>Order an alignment in order of average feature score or
total feature count</li>
<li>Shading features by score or associated description</li>
+ <li>Subdivide alignment and groups based on identity of selected subsequence (Make Groups from Selection).</li>
+ <li>New hide/show options including Shift+Control+H to hide everything but the currently selected region.</li>
<!-- introduced but not yet documented <li>Experimental blast report parser</li> -->
</ul>
<em>Vamsas Capabilities</em>
<li>AMSA files only contain first column of multi-character column annotation labels</li>
<li>Jalview Annotation File generation/parsing consistent with documentation (e.g. Stockholm annotation can be exported and re-imported)</li>
<li>PDB files without embedded PDB IDs given a friendly name</li>
+ <li>Find incrementally searches ID string matches as well as subsequence matches, and correctly reports total number of both.</li>
<li>Applet:
<ul>
<li></li>
sources</li>
<li>Ensured that command line das feature retrieval completes
before alignment figures are generated.</li>
+ <li>Reduced time taken when opening file browser for first time.</li>
</ul>
</li>
</ul>
{
boolean toggleSeqs = !evt.isControlDown();
boolean toggleCols = !evt.isShiftDown();
- boolean hide = false;
- SequenceGroup sg = viewport.getSelectionGroup();
-
- if (toggleSeqs)
- {
- if (sg != null && sg.getSize() != viewport.alignment.getHeight())
- {
- hide = true;
- viewport.hideAllSelectedSeqs();
- }
- else if (!(toggleCols && viewport.colSel.getSelected().size() > 0))
- {
- viewport.showAllHiddenSeqs();
- }
- }
-
- if (toggleCols)
- {
- if (viewport.colSel.getSelected().size() > 0)
- {
- viewport.hideSelectedColumns();
- if (!toggleSeqs)
- {
- viewport.selectionGroup = sg;
- }
- }
- else if (!hide)
- {
- viewport.showAllHiddenColumns();
- }
- }
+ toggleHiddenRegions(toggleSeqs, toggleCols);
break;
}
{
if (evt.isAltDown())
{
- viewport.invertColumnSelection();
+ invertColSel_actionPerformed();
}
else
{
- this.invertSequenceMenuItem_actionPerformed();
+ invertSequenceMenuItem_actionPerformed();
}
}
break;
}
alignPanel.paintAlignment(true);
}
+ /**
+ * called by key handler and the hide all/show all menu items
+ * @param toggleSeqs
+ * @param toggleCols
+ */
+ private void toggleHiddenRegions(boolean toggleSeqs,
+ boolean toggleCols)
+ {
+ boolean hide = false;
+ SequenceGroup sg = viewport.getSelectionGroup();
+ if (!toggleSeqs && !toggleCols)
+ {
+ // Hide everything by the current selection - this is a hack - we do the
+ // invert and then hide
+ // first check that there will be visible columns after the invert.
+ if ((viewport.colSel != null
+ && viewport.colSel.getSelected() != null && viewport.colSel
+ .getSelected().size() > 0)
+ || (sg != null && sg.getSize() > 0 && sg.getStartRes() <= sg
+ .getEndRes()))
+ {
+ // now invert the sequence set, if required - empty selection implies
+ // that no hiding is required.
+ if (sg != null)
+ {
+ invertSequenceMenuItem_actionPerformed();
+ sg = viewport.getSelectionGroup();
+ toggleSeqs = true;
+
+ }
+ viewport.expandColSelection(sg, true);
+ // finally invert the column selection and get the new sequence
+ // selection and indicate it should be hidden.
+ invertColSel_actionPerformed();
+ toggleCols = true;
+ }
+ }
+
+ if (toggleSeqs)
+ {
+ if (sg != null && sg.getSize() != viewport.alignment.getHeight())
+ {
+ hide = true;
+ viewport.hideAllSelectedSeqs();
+ }
+ else if (!(toggleCols && viewport.colSel.getSelected().size() > 0))
+ {
+ viewport.showAllHiddenSeqs();
+ }
+ }
+ if (toggleCols)
+ {
+ if (viewport.colSel.getSelected().size() > 0)
+ {
+ viewport.hideSelectedColumns();
+ if (!toggleSeqs)
+ {
+ viewport.selectionGroup = sg;
+ }
+ }
+ else if (!hide)
+ {
+ viewport.showAllHiddenColumns();
+ }
+ }
+ }
public void keyReleased(KeyEvent evt)
{
}
else if (source == showSeqs)
{
viewport.showAllHiddenSeqs();
+ alignPanel.paintAlignment(true);
}
else if (source == hideColumns)
{
&& viewport.getSelectionGroup() != null)
{
viewport.hideAllSelectedSeqs();
+ alignPanel.paintAlignment(true);
+ }
+ else if (source == hideAllButSelection) {
+ toggleHiddenRegions(false,false);
+ alignPanel.paintAlignment(true);
+ }
+ else if (source == hideAllSelection) {
+ SequenceGroup sg = viewport.getSelectionGroup();
+ viewport.expandColSelection(sg, false);
+ viewport.hideAllSelectedSeqs();
+ viewport.hideSelectedColumns();
+ alignPanel.paintAlignment(true);
+ }
+ else if (source == showAllHidden) {
+ viewport.showAllHiddenColumns();
+ viewport.showAllHiddenSeqs();
+ alignPanel.paintAlignment(true);
}
else if (source == featureSettings)
{
PaintRefresher.Refresh(alignPanel, viewport.getSequenceSetId());
}
+ public void invertColSel_actionPerformed()
+ {
+ viewport.invertColumnSelection();
+ alignPanel.paintAlignment(true);
+ PaintRefresher.Refresh(alignPanel, viewport.getSequenceSetId());
+ }
void trimAlignment(boolean trimLeft)
{
menu2.setLabel("Hide");
hideColumns.setLabel("Selected Columns");
hideSequences.setLabel("Selected Sequences");
+ hideAllButSelection.setLabel("All but Selected Region (Shift+Ctrl+H)");
+ hideAllSelection.setLabel("Selected Region");
+ showAllHidden.setLabel("All Sequences and Columns");
invertColSel.addActionListener(this);
showColumns.addActionListener(this);
showSeqs.addActionListener(this);
hideColumns.addActionListener(this);
hideSequences.addActionListener(this);
+ hideAllButSelection.addActionListener(this);
+ hideAllSelection.addActionListener(this);
+ showAllHidden.addActionListener(this);
formatMenu.setLabel("Format");
selectMenu.setLabel("Select");
newView.setLabel("New View");
helpMenu.add(about);
menu1.add(showColumns);
menu1.add(showSeqs);
+ menu1.add(showAllHidden);
menu2.add(hideColumns);
menu2.add(hideSequences);
+ menu2.add(hideAllSelection);
+ menu2.add(hideAllButSelection);
formatMenu.add(font);
formatMenu.add(seqLimits);
formatMenu.add(wrapMenuItem);
MenuItem hideSequences = new MenuItem();
+ MenuItem hideAllButSelection = new MenuItem();
+ MenuItem hideAllSelection = new MenuItem();
+ MenuItem showAllHidden = new MenuItem();
+
Menu formatMenu = new Menu();
Menu selectMenu = new Menu();
{
boolean toggleSeqs = !evt.isControlDown();
boolean toggleCols = !evt.isShiftDown();
-
- boolean hide = false;
- SequenceGroup sg = viewport.getSelectionGroup();
- // TODO: document ctrl-shift-h for show visible selected area and fix hack so columns for the current selected region get transferred.
- if (!toggleSeqs && !toggleCols)
- {
- // Hide everything by the current selection - this is a hack - we do the invert and then hide
- // first check that there will be visible columns after the invert.
- if ((viewport.colSel!=null && viewport.colSel.getSelected()!=null && viewport.colSel.getSelected().size()>0) || (sg!=null && sg.getSize()>0 && sg.getStartRes()<=sg.getEndRes()))
- {
- // now invert the sequence set, if required - empty selection implies that no hiding is required.
- if (sg!=null) {
- invertSequenceMenuItem_actionPerformed(null);
- sg = viewport.getSelectionGroup();
- toggleSeqs = true;
-
- }
-
- if (sg!=null && sg.getStartRes()>=0 && sg.getStartRes()<=sg.getEndRes()&& (viewport.colSel==null || viewport.colSel.getSelected()==null || viewport.colSel.getSelected().size()==0))
- {
- // synthesize a column selection if none exists. this happens if a single region has been selected rather than whole columns.
- if (viewport.colSel==null)
- {
- viewport.colSel = new ColumnSelection();
- }
- for (int cspos = sg.getStartRes(); cspos<=sg.getEndRes(); cspos++) {
- viewport.colSel.addElement(cspos);
- }
- }
- // finally invert the column selection and get the new sequence selection.
- invertColSel_actionPerformed(null);
- toggleCols = true;
- }
- }
-
- if (toggleSeqs)
- {
- if (sg != null
- && sg.getSize() != viewport.alignment.getHeight())
- {
- hideSelSequences_actionPerformed(null);
- hide = true;
- }
- else if (!(toggleCols && viewport.colSel.getSelected().size() > 0))
- {
- showAllSeqs_actionPerformed(null);
- }
- }
-
- if (toggleCols)
- {
- if (viewport.colSel.getSelected().size() > 0)
- {
- hideSelColumns_actionPerformed(null);
- if (!toggleSeqs)
- {
- viewport.selectionGroup = sg;
- }
- }
- else if (!hide)
- {
- showAllColumns_actionPerformed(null);
- }
- }
- break;
+ toggleHiddenRegions(toggleSeqs,toggleCols);
+ break;
}
case KeyEvent.VK_PAGE_UP:
if (viewport.wrapAlignment)
viewport.hideAllSelectedSeqs();
alignPanel.paintAlignment(true);
}
+ /**
+ * called by key handler and the hide all/show all menu items
+ * @param toggleSeqs
+ * @param toggleCols
+ */
+ private void toggleHiddenRegions(boolean toggleSeqs,
+ boolean toggleCols)
+ {
+
+ boolean hide = false;
+ SequenceGroup sg = viewport.getSelectionGroup();
+ if (!toggleSeqs && !toggleCols)
+ {
+ // Hide everything by the current selection - this is a hack - we do the invert and then hide
+ // first check that there will be visible columns after the invert.
+ if ((viewport.colSel!=null && viewport.colSel.getSelected()!=null && viewport.colSel.getSelected().size()>0) || (sg!=null && sg.getSize()>0 && sg.getStartRes()<=sg.getEndRes()))
+ {
+ // now invert the sequence set, if required - empty selection implies that no hiding is required.
+ if (sg!=null) {
+ invertSequenceMenuItem_actionPerformed(null);
+ sg = viewport.getSelectionGroup();
+ toggleSeqs = true;
+
+ }
+ viewport.expandColSelection(sg,true);
+ // finally invert the column selection and get the new sequence selection.
+ invertColSel_actionPerformed(null);
+ toggleCols = true;
+ }
+ }
+
+ if (toggleSeqs)
+ {
+ if (sg != null
+ && sg.getSize() != viewport.alignment.getHeight())
+ {
+ hideSelSequences_actionPerformed(null);
+ hide = true;
+ }
+ else if (!(toggleCols && viewport.colSel.getSelected().size() > 0))
+ {
+ showAllSeqs_actionPerformed(null);
+ }
+ }
+
+ if (toggleCols)
+ {
+ if (viewport.colSel.getSelected().size() > 0)
+ {
+ hideSelColumns_actionPerformed(null);
+ if (!toggleSeqs)
+ {
+ viewport.selectionGroup = sg;
+ }
+ }
+ else if (!hide)
+ {
+ showAllColumns_actionPerformed(null);
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see jalview.jbgui.GAlignFrame#hideAllButSelection_actionPerformed(java.awt.event.ActionEvent)
+ */
+ public void hideAllButSelection_actionPerformed(ActionEvent e)
+ {
+ toggleHiddenRegions(false, false);
+ }
+
+ /* (non-Javadoc)
+ * @see jalview.jbgui.GAlignFrame#hideAllSelection_actionPerformed(java.awt.event.ActionEvent)
+ */
+ public void hideAllSelection_actionPerformed(ActionEvent e)
+ {
+ SequenceGroup sg = viewport.getSelectionGroup();
+ viewport.expandColSelection(sg,false);
+ viewport.hideAllSelectedSeqs();
+ viewport.hideSelectedColumns();
+ alignPanel.paintAlignment(true);
+ }
+
+ /* (non-Javadoc)
+ * @see jalview.jbgui.GAlignFrame#showAllhidden_actionPerformed(java.awt.event.ActionEvent)
+ */
+ public void showAllhidden_actionPerformed(ActionEvent e)
+ {
+ viewport.showAllHiddenColumns();
+ viewport.showAllHiddenSeqs();
+ alignPanel.paintAlignment(true);
+ }
public void hideSelColumns_actionPerformed(ActionEvent e)
{
JMenuItem hideSelColumns = new JMenuItem();
+ JMenuItem hideAllButSelection = new JMenuItem();
+
+ JMenuItem hideAllSelection = new JMenuItem();
+
+ JMenuItem showAllhidden = new JMenuItem();
+
protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
JMenuItem invertColSel = new JMenuItem();
statusPanel.setLayout(gridLayout1);
jMenu3.setText("Show");
showAllSeqs.setText("All Sequences");
+ showAllSeqs.setToolTipText("Shift+H toggles sequence visiblity.");
showAllSeqs.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
}
});
showAllColumns.setText("All Columns");
+ showAllColumns.setToolTipText("Ctrl+H toggles column visiblity.");
showAllColumns.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
});
hideMenu.setText("Hide");
hideSelSequences.setText("Selected Sequences");
+ hideSelSequences.setToolTipText("Shift+H toggles sequence visiblity.");
hideSelSequences.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
}
});
hideSelColumns.setText("Selected Columns");
+ hideSelColumns.setToolTipText("Ctrl+H toggles column visiblity.");
hideSelColumns.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
hideSelColumns_actionPerformed(e);
}
});
+ hideAllSelection.setText("Selected Region");
+ hideAllSelection.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ hideAllSelection_actionPerformed(e);
+ }
+ });
+ // TODO: should be hidden if no selection exists.
+ hideAllButSelection.setText("All but Selected Rregion (Shift+Ctrl+H)");
+ hideAllButSelection.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ hideAllButSelection_actionPerformed(e);
+ }
+ });
+ showAllhidden.setText("All Sequences and Columns");
+ showAllhidden.setToolTipText("H toggles visibility of hidden or selected regions.");
+ showAllhidden.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ showAllhidden_actionPerformed(e);
+ }
+ });
+
hiddenMarkers.setText("Show Hidden Markers");
hiddenMarkers.addActionListener(new ActionListener()
{
this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
jMenu3.add(showAllColumns);
jMenu3.add(showAllSeqs);
+ jMenu3.add(showAllhidden);
hideMenu.add(hideSelColumns);
hideMenu.add(hideSelSequences);
+ hideMenu.add(hideAllSelection);
+ hideMenu.add(hideAllButSelection);
+
formatMenu.add(font);
formatMenu.addSeparator();
formatMenu.add(wrapMenuItem);
selectMenu.add(grpsFromSelection);
}
+ protected void showAllhidden_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void hideAllButSelection_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void hideAllSelection_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub