/** * Disposes of the view menu associated with the given tab folder. * * @param ctf * the tab folder to clear of its view menu */ public void disposeViewMenu(CTabFolder ctf) { ToolBar vmTB = getViewMenuTB(ctf); if (vmTB != null && !vmTB.isDisposed()) vmTB.dispose(); }
/** * Creates a view menu for the given part in the contained tab folder. * * @param part * the part that should have its view menu created * @param ctf * the containing tab folder */ public void setupMenuButton(MPart part, CTabFolder ctf) { MMenu viewMenu = getViewMenu(part); // View menu (if any) if (viewMenu != null && hasVisibleMenuItems(viewMenu, part)) { showMenuButton(part, ctf, viewMenu); } else { // hide the menu's TB ToolBar menuTB = getViewMenuTB(ctf); if (menuTB != null) { menuTB.dispose(); } } }
public void clearTR(CTabFolder ctf) { disposeViewMenu(ctf); ToolBar vmTB = getViewMenuTB(ctf); if (vmTB != null && !vmTB.isDisposed()) vmTB.dispose(); MToolBar viewTBModel = getViewTB(ctf); if (viewTBModel != null && viewTBModel.getWidget() != null) viewTBModel.setVisible(false); ctf.setTopRight(null); getTRComposite(ctf).setVisible(false); }
private void showMenuButton(MPart part, CTabFolder ctf, MMenu menu) { ToolBar menuTB = getViewMenuTB(ctf); if (menuTB == null) { menuTB = new ToolBar(getTRComposite(ctf), SWT.FLAT | SWT.RIGHT);