/** * Passes the menu to the body. * * @param menu */ @Override public void setMenu(Menu menu) { customMenu = true; super.setMenu(menu); if (content != null) content.setMenu(menu); }
/** * Passes the menu to the body. * * @param menu */ @Override public void setMenu(Menu menu) { customMenu = true; super.setMenu(menu); if (content != null) content.setMenu(menu); }
/** * Creates the form control as a child of the provided parent. * * @param parent * the parent widget */ public ScrolledForm(Composite parent, int style) { super(parent, style); super.setMenu(parent.getMenu()); content = new Form(this, SWT.NULL); super.setContent(content); content.setMenu(getMenu()); addDisposeListener(new DisposeListener() { @Override public void widgetDisposed(DisposeEvent e) { if (!customMenu) setMenu(null); } }); }
/** * Creates the form control as a child of the provided parent. * * @param parent * the parent widget */ public ScrolledForm(Composite parent, int style) { super(parent, style); super.setMenu(parent.getMenu()); content = new Form(this, SWT.NULL); super.setContent(content); content.setMenu(getMenu()); addDisposeListener(e -> { if (!customMenu) setMenu(null); }); }