Skip to content

Commit ecb6996

Browse files
jisedlacthurka
authored andcommitted
GH-122 - do not track mouse wheel in TabbedPane component
1 parent f5eb113 commit ecb6996

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

visualvm/uisupport/src/org/graalvm/visualvm/uisupport/ProfilerTabbedPane.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ public void mouseWheelMoved(MouseWheelEvent e) {
9090

9191
public void addTab(String title, Icon icon, final Component component, String tip, boolean closable) {
9292
int tabCount = getTabCount();
93+
94+
if (component.getMouseWheelListeners().length == 0 && UIUtils.isAquaLookAndFeel()) {
95+
component.addMouseWheelListener(new MouseWheelListener() {
96+
@Override
97+
public void mouseWheelMoved(MouseWheelEvent e) {
98+
// GH-122
99+
}
100+
});
101+
}
93102
super.addTab(title, icon, component, tip);
94103

95104
Runnable closer = closable ? new Runnable() {

0 commit comments

Comments
 (0)