getPopupLayout().applyTo(composite); getGrabBothGridData().applyTo(composite); return composite;
getPopupLayout().applyTo(composite); getGrabBothGridData().applyTo(composite); return composite;
/** * Creates the title and menu area. Subclasses typically need not override * this method, but instead should use the constructor parameters * <code>showDialogMenu</code> and <code>showPersistAction</code> to * indicate whether a menu should be shown, and * <code>createTitleControl</code> to to customize the presentation of the * title. * * <p> * If this method is overridden, the returned control's layout data must be * an instance of <code>GridData</code>. This method must not modify the * parent's layout. * * @param parent * The parent composite. * @return The Control representing the title and menu area. */ protected Control createTitleMenuArea(Composite parent) { Composite titleAreaComposite = new Composite(parent, SWT.NONE); getPopupLayout().copy().numColumns(2).applyTo(titleAreaComposite); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(titleAreaComposite); createTitleControl(titleAreaComposite); if (showDialogMenu) { createDialogMenu(titleAreaComposite); } return titleAreaComposite; }
/** * Creates the title and menu area. Subclasses typically need not override * this method, but instead should use the constructor parameters * <code>showDialogMenu</code> and <code>showPersistAction</code> to * indicate whether a menu should be shown, and * <code>createTitleControl</code> to to customize the presentation of the * title. * * <p> * If this method is overridden, the returned control's layout data must be * an instance of <code>GridData</code>. This method must not modify the * parent's layout. * * @param parent * The parent composite. * @return The Control representing the title and menu area. */ protected Control createTitleMenuArea(Composite parent) { Composite titleAreaComposite = new Composite(parent, SWT.NONE); getPopupLayout().copy().numColumns(2).applyTo(titleAreaComposite); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(titleAreaComposite); createTitleControl(titleAreaComposite); if (showDialogMenu) { createDialogMenu(titleAreaComposite); } return titleAreaComposite; }
protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); getPopupLayout().applyTo(composite); getGrabBothGridData().applyTo(composite);
protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); getPopupLayout().applyTo(composite); getGrabBothGridData().applyTo(composite);