From 8c2c886b4700a3ed0e125d343167584288c26d2a Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Fri, 25 Sep 2015 11:11:34 +0100 Subject: [PATCH] JAL-1860 disabled default enter behaviour on pdb search summary table, and added implementation for backtab --- src/jalview/jbgui/GPDBSearchPanel.java | 11 ++++++++++- src/jalview/jbgui/GStructureChooser.java | 20 ++++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/jalview/jbgui/GPDBSearchPanel.java b/src/jalview/jbgui/GPDBSearchPanel.java index 58ec25e..ddb2f7a 100644 --- a/src/jalview/jbgui/GPDBSearchPanel.java +++ b/src/jalview/jbgui/GPDBSearchPanel.java @@ -186,9 +186,18 @@ public abstract class GPDBSearchPanel extends JPanel { btn_ok_ActionPerformed(); } + evt.consume(); break; case KeyEvent.VK_TAB: // tab key - btn_back.requestFocus(); + if (evt.isShiftDown()) + { + txt_search.requestFocus(); + } + else + { + btn_back.requestFocus(); + } + break; default: return; } diff --git a/src/jalview/jbgui/GStructureChooser.java b/src/jalview/jbgui/GStructureChooser.java index 73a5615..cf80613 100644 --- a/src/jalview/jbgui/GStructureChooser.java +++ b/src/jalview/jbgui/GStructureChooser.java @@ -241,7 +241,15 @@ public abstract class GStructureChooser extends JPanel implements } break; case KeyEvent.VK_TAB: // tab key - btn_view.requestFocus(); + if (evt.isShiftDown()) + { + chk_invertFilter.requestFocus(); + } + else + { + btn_view.requestFocus(); + } + break; default: return; } @@ -279,7 +287,15 @@ public abstract class GStructureChooser extends JPanel implements } break; case KeyEvent.VK_TAB: // tab key - btn_cancel.requestFocus(); + if (evt.isShiftDown()) + { + cmb_filterOption.requestFocus(); + } + else + { + btn_view.requestFocus(); + } + default: return; } -- 1.7.10.2