Skip to content

Commit 018ca38

Browse files
committed
GH-52 Fixed keyboard navigation
- ClosableTabbledPane is not a focus cycle root - CloseButton is focusable
1 parent 9490828 commit 018ca38

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

visualvm/core/src/com/sun/tools/visualvm/core/ui/DataSourceWindowTabbedPane.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ private static boolean isWindowsLaF () {
8989

9090
tabpane = TabbedPaneFactory.createCloseButtonTabbedPane();
9191
tabpane.setTabLayoutPolicy(JTabbedPane.WRAP_TAB_LAYOUT);
92+
93+
// GH-52 - true would break Tab navigation
94+
tabpane.setFocusCycleRoot(false);
9295

9396
// Clear default border for fill up the entire DataSourceWindow
9497
tabpane.setOpaque(false);

visualvm/core/src/com/sun/tools/visualvm/core/ui/components/DisplayArea.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ private void initComponents() {
455455
// ImageIcon closeIcon = new ImageIcon(DisplayArea.class.getResource("/com/sun/tools/visualvm/core/ui/resources/closePanel.png")); // NOI18N
456456
// closeButton = new DisplayAreaSupport.ImageIconButton(closeIcon);
457457
closeButton = CloseButtonFactory.createBigCloseButton();
458+
closeButton.setFocusable(true); // GH-52 - enable closing the view using keyboard
458459
closeButton.setToolTipText(NbBundle.getMessage(DisplayArea.class, "ToolTip_Hide")); // NOI18N
459460
closeButton.addActionListener(new ActionListener() {
460461
public void actionPerformed(ActionEvent e) { getParent().getParent().setVisible(false); }

0 commit comments

Comments
 (0)