From: Jim Procter Date: Tue, 22 Nov 2016 12:41:33 +0000 (+0000) Subject: JAL-1738 JAL-345 changed keystroke to ‘B’ (with modifiers) and added documentation X-Git-Tag: Release_2_10_1~10^2~6^2~1^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=936ac942e96e2767e1b1fff46e805e8a1e5be1c7;p=jalview.git JAL-1738 JAL-345 changed keystroke to ‘B’ (with modifiers) and added documentation --- diff --git a/help/html/features/chimera.html b/help/html/features/chimera.html index 257c84c..cbef2c1 100644 --- a/help/html/features/chimera.html +++ b/help/html/features/chimera.html @@ -65,15 +65,15 @@ number and chain code ([RES]Num:Chain). Moving the mouse over an associated residue in an alignment window highlights the associated atoms in the displayed structures. When residues are selected in the - Chimera window, they are highlighted on the alignment. For - comprehensive details of Chimera's commands, refer to the tool's - Help menu. - + Chimera window, they are highlighted on the alignment. +

For comprehensive details of Chimera's commands, refer to the + tool's Help menu.

Selecting residues in Jalview from Chimera
- When a selection is highlighted in a Jalview window, use the Select→Select - Highlighted Region function to create a column selection for the - mapped positions in the sequence alignment. + When a selection is highlighted in a Jalview window, use the + Select→Select Highlighted Region or press B + to add the mapped positions to the alignment window's column + selection.

Basic screen operations (see

- Controls
The structure is by default - rendered as a ribbon diagram. Moving the mouse over the structure - brings up tooltips giving the residue name, PDB residue number and - chain code, atom name and number - ([RES]Num:Chain.AtomName#AtomNumber). If a mapping exists to a - residue in any associated sequences, then this will be highlighted - in each one's alignment window. The converse also occurs - moving - the mouse over an associated residue in an alignment window - highlights the associated atoms in the displayed structures. + Controls
The structure is by default rendered + as a ribbon diagram. Moving the mouse over the structure brings up + tooltips giving the residue name, PDB residue number and chain code, + atom name and number ([RES]Num:Chain.AtomName#AtomNumber). If a + mapping exists to a residue in any associated sequences, then this + will be highlighted in each one's alignment window. The converse + also occurs - moving the mouse over an associated residue in an + alignment window highlights the associated atoms in the displayed + structures. Press B or use + Select→Select Highlighted columns from any linked + alignment window to mark the columns highlighted after mousing over + the structure.

Selecting a residue highlights its associated sequence residue and alpha carbon location. Double clicking an atom allows distances diff --git a/help/html/features/search.html b/help/html/features/search.html index 9766782..82516bf 100755 --- a/help/html/features/search.html +++ b/help/html/features/search.html @@ -65,6 +65,17 @@ td { Settings" under the "View" menu to change the visibility and colour of the new sequence feature.

+

+ Selecting regions from Search Results +

+

+ Press 'B' or select the Select Highlighted Columns option + from the alignment window's select menu to add columns containing + highlighted search results to the alignment window's column + selection. +

+

+ A quick Regular Expression Guide

A regular expression is not just a simple text query - although diff --git a/help/html/keys.html b/help/html/keys.html index 2ba9a49..b79ce4d 100755 --- a/help/html/keys.html +++ b/help/html/keys.html @@ -167,6 +167,19 @@ columns are selected, you should use the H Both Launches the search window + B + Both + Mark the currently highlighted columns + + Alt 'B' + Both + Mark all but the currently highlighted columns + + Control 'B' + Both + Toggle the marks on the currently highlighted + columns (or all others if Alt is pressed) + H Both diff --git a/help/html/menus/alignmentMenu.html b/help/html/menus/alignmentMenu.html index 24f8239..167cb25 100755 --- a/help/html/menus/alignmentMenu.html +++ b/help/html/menus/alignmentMenu.html @@ -279,12 +279,11 @@ columns in the alignment according to secondary structure, labels and values shown in alignment annotation rows.

  • Select Highlighted Columns
    Selects - the columns currently highlighted as a result of a find, mouse - over, or selection event from a linked structure viewer or other - application. Modifiers will work on some platforms: SHIFT will - add columns to selection, ALT will invert the highlighted set - before selection, and CTRL (or META) will toggle the selection. -
  • + the columns currently highlighted as a result of a find, mouse + over, or selection event from a linked structure viewer or other + application. Modifiers will work on some platforms: ALT will add + all but the highlighted set to the column selection, and CTRL + (or META) will toggle the selection.
  • View
      diff --git a/help/html/menus/alwselect.html b/help/html/menus/alwselect.html index 0318818..07828a3 100644 --- a/help/html/menus/alwselect.html +++ b/help/html/menus/alwselect.html @@ -70,10 +70,9 @@
    • Select Highlighted Columns
      Selects the columns currently highlighted as a result of a find, mouse over, or selection event from a linked structure viewer or other - application. Modifiers will work on some platforms: SHIFT will - add columns to selection, ALT will invert the highlighted set - before selection, and CTRL (or META) will toggle the selection. -
    • + application. Modifiers will work on some platforms: ALT will add + all but the highlighted set to the column selection, and CTRL + (or META) will toggle the selection.
    diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 8739d74..b3f02a0 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -126,6 +126,7 @@ action.colour = Colour action.calculate = Calculate action.select_all = Select all action.select_highlighted_columns = Select Highlighted Columns +tooltip.select_highlighted_columns = Press B to mark highlighted columns, Ctrl-B to toggle, and Alt-B to mark all but highlighted columns action.deselect_all = Deselect all action.invert_selection = Invert selection action.using_jmol = Using Jmol diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 8a09c1d..6a389b6 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -669,6 +669,16 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, toggleHiddenRegions(toggleSeqs, toggleCols); break; } + case KeyEvent.VK_B: + { + boolean toggleSel = evt.isControlDown() || evt.isMetaDown(); + boolean modifyExisting = true; // always modify, don't clear + // evt.isShiftDown(); + boolean invertHighlighted = evt.isAltDown(); + avc.markHighlightedColumns(invertHighlighted, modifyExisting, + toggleSel); + break; + } case KeyEvent.VK_PAGE_UP: if (viewport.getWrapAlignment()) { @@ -5934,10 +5944,11 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, protected void selectHighlightedColumns_actionPerformed( ActionEvent actionEvent) { + // include key modifier check in case user selects from menu avc.markHighlightedColumns( (actionEvent.getModifiers() & ActionEvent.ALT_MASK) != 0, - (actionEvent.getModifiers() & ActionEvent.SHIFT_MASK) != 0, - (actionEvent.getModifiers() & ActionEvent.CTRL_MASK) != 0); + true, + (actionEvent.getModifiers() & (ActionEvent.META_MASK | ActionEvent.CTRL_MASK)) != 0); } } diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index d6474f1..af8a172 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -2182,9 +2182,9 @@ public class GAlignFrame extends JInternalFrame } }); JMenuItem selectHighlighted = new JMenuItem( - MessageManager.getString("label.select_highlighted_columns")); - keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L, Toolkit - .getDefaultToolkit().getMenuShortcutKeyMask(), false); + MessageManager.getString("action.select_highlighted_columns")); + selectHighlighted.setToolTipText(MessageManager + .getString("tooltip.select_highlighted_columns")); al = new ActionListener() { @Override @@ -2193,8 +2193,7 @@ public class GAlignFrame extends JInternalFrame selectHighlightedColumns_actionPerformed(actionEvent); } }; - addMenuActionAndAccelerator(keyStroke, selectHighlighted, al); - + selectHighlighted.addActionListener(al); JMenu tooltipSettingsMenu = new JMenu( MessageManager.getString("label.sequence_id_tooltip")); JMenu autoAnnMenu = new JMenu(