/** Creates the cool and tool bar. These build the menu bar of the Riena sub-application. */ private void create() { menuCoolBar = new CoolBar(this, SWT.FLAT); menuCoolItem = CoolbarUtils.initCoolBar(menuCoolBar, getMenuBarFont()); menuToolBar = (ToolBar) menuCoolItem.getControl(); final ToolBarMenuListener listener = new ToolBarMenuListener(); menuToolBar.addMouseListener(listener); SWTFacade.getDefault().addMouseTrackListener(menuToolBar, listener); menuToolBar.addTraverseListener(listener); fillMenuBar(listener); }
private void initMouseWheelObserver(final Composite navigationComponent) { if (SwtUtilities.isDisposed(navigationComponent)) { return; } final Display display = navigationComponent.getDisplay(); final MouseWheelAdapter wheelAdapter = new MouseWheelAdapter(); SWTFacade.getDefault().addFilterMouseWheel(display, wheelAdapter); navigationComponent.addDisposeListener( new DisposeListener() { public void widgetDisposed(final DisposeEvent e) { SWTFacade.getDefault().removeFilterMouseWheel(display, wheelAdapter); } }); }