this.addKeyListener(this);\r
alignPanel.seqPanel.seqCanvas.addKeyListener(this);\r
alignPanel.idPanel.idCanvas.addKeyListener(this);\r
+ alignPanel.scalePanel.addKeyListener(this);\r
+ alignPanel.annotationPanel.addKeyListener(this);\r
\r
viewport.addPropertyChangeListener(new java.beans.PropertyChangeListener()\r
{\r
findMenuItem_actionPerformed();\r
}\r
break;\r
+ case KeyEvent.VK_H:\r
+ {\r
+ SequenceGroup sg = viewport.getSelectionGroup();\r
+ if (sg != null && sg.getSize(false) != viewport.alignment.getHeight())\r
+ {\r
+ hideSelectedSeqs();\r
+ }\r
+ else\r
+ viewport.showAllHiddenSeqs();\r
+\r
+ if (viewport.colSel.getSelected().size() > 0)\r
+ {\r
+ viewport.hideSelectedColumns();\r
+ }\r
+ else\r
+ {\r
+ viewport.showAllHiddenColumns();\r
+ }\r
+ alignPanel.repaint();\r
+ break;\r
+ }\r
+\r
}\r
}\r
public void keyReleased(KeyEvent evt)\r
}\r
else if(source == hideSequences && viewport.getSelectionGroup()!=null)\r
{\r
- SequenceI[] seqs = viewport.getSelectionGroup().getSequencesInOrder(\r
- viewport.alignment\r
- );\r
-\r
- for (int i = 0; i < seqs.length; i++)\r
- {\r
- viewport.hideSequence(seqs[i]);\r
- }\r
-\r
- alignPanel.repaint();\r
+ hideSelectedSeqs();\r
}\r
else if(source==featureSettings)\r
featureSettings_actionPerformed();\r
alignPanel.repaint();\r
}\r
\r
+ void hideSelectedSeqs()\r
+ {\r
+ SequenceI[] seqs = viewport.getSelectionGroup().getSequencesInOrder(\r
+ viewport.alignment\r
+ );\r
+\r
+ for (int i = 0; i < seqs.length; i++)\r
+ {\r
+ viewport.hideSequence(seqs[i]);\r
+ }\r
+\r
+ alignPanel.repaint();\r
+ }\r
+\r
protected void scaleAbove_actionPerformed()\r
{\r
viewport.setScaleAboveWrapped(scaleAbove.getState());\r