/** * Creates a scrolled page book widget as a part of the form. * * @param parent * the page book parent * @param style * the text style * @return the scrolled page book widget */ public ScrolledPageBook createPageBook(Composite parent, int style) { ScrolledPageBook book = new ScrolledPageBook(parent, style | orientation); adapt(book, true, true); book.setMenu(parent.getMenu()); return book; }
protected int createPropertySheet(Composite parent) { fToolkit = new FormToolkit(parent.getDisplay()); int toolkitBorderStyle = fToolkit.getBorderStyle(); int style = toolkitBorderStyle == SWT.BORDER ? SWT.NULL : SWT.BORDER; Composite container = new Composite(parent, style); FillLayout flayout = new FillLayout(); flayout.marginWidth = 1; flayout.marginHeight = 1; container.setLayout(flayout); container.setLayoutData(new GridData(GridData.FILL_BOTH)); fPageBook = new ScrolledPageBook(container, style | SWT.V_SCROLL | SWT.H_SCROLL); fToolkit.adapt(fPageBook, false, false); createRestoreButtonSection(parent); if (style == SWT.NULL) { fPageBook.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TREE_BORDER); fToolkit.paintBordersFor(container); } return style == SWT.NULL ? 2 : 0; }
/** * Creates a scrolled page book widget as a part of the form. * * @param parent * the page book parent * @param style * the text style * @return the scrolled page book widget */ public ScrolledPageBook createPageBook(Composite parent, int style) { checkDisposed(); ScrolledPageBook book = new ScrolledPageBook(parent, style | orientation); adapt(book, true, true); book.setMenu(parent.getMenu()); return book; }