Search in sources :

Example 16 with PageBook

use of org.eclipse.ui.part.PageBook in project tdi-studio-se by Talend.

the class CpuDumpEditor method createCallerCalleePage.

/**
     * Creates the caller/callee page.
     */
private void createCallerCalleePage() {
    callersCalleesPageBook = new PageBook(getContainer(), SWT.NONE);
    Label messageLabel = new Label(callersCalleesPageBook, SWT.WRAP);
    messageLabel.setText(Messages.noCallersCalleesMessage);
    SashForm sashForm = new SashForm(callersCalleesPageBook, SWT.NONE);
    sashForm.setOrientation(SWT.VERTICAL);
    sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
    int page = addPage(callersCalleesPageBook);
    createCallerViewer(sashForm, page);
    createCalleeViewer(sashForm, page);
    setPageText(page, Messages.callerCalleePageLabel);
    setPageImage(page, getCallerCalleeImage());
    callersCalleesPageBook.showPage(sashForm);
}
Also used : SashForm(org.eclipse.swt.custom.SashForm) PageBook(org.eclipse.ui.part.PageBook) Label(org.eclipse.swt.widgets.Label) GridData(org.eclipse.swt.layout.GridData)

Example 17 with PageBook

use of org.eclipse.ui.part.PageBook in project eclipse.platform.text by eclipse.

the class AbstractTextSearchViewPage method createControl.

@Override
public void createControl(Composite parent) {
    fQueryListener = createQueryListener();
    // $NON-NLS-1$
    fMenu = new MenuManager("#PopUp");
    fMenu.setRemoveAllWhenShown(true);
    fMenu.setParent(getSite().getActionBars().getMenuManager());
    fMenu.addMenuListener(new IMenuListener() {

        @Override
        public void menuAboutToShow(IMenuManager mgr) {
            SearchView.createContextMenuGroups(mgr);
            fillContextMenu(mgr);
            fViewPart.fillContextMenu(mgr);
        }
    });
    fPagebook = new PageBook(parent, SWT.NULL);
    fPagebook.setLayoutData(new GridData(GridData.FILL_BOTH));
    fBusyLabel = createBusyControl();
    fViewerContainer = new Composite(fPagebook, SWT.NULL);
    fViewerContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
    fViewerContainer.setSize(100, 100);
    fViewerContainer.setLayout(new FillLayout());
    fViewerAdapter = new SelectionProviderAdapter();
    getSite().setSelectionProvider(fViewerAdapter);
    // Register menu
    getSite().registerContextMenu(fViewPart.getViewSite().getId(), fMenu, fViewerAdapter);
    createViewer(fViewerContainer, fCurrentLayout);
    showBusyLabel(fIsBusyShown);
    NewSearchUI.addQueryListener(fQueryListener);
}
Also used : PageBook(org.eclipse.ui.part.PageBook) Composite(org.eclipse.swt.widgets.Composite) MenuManager(org.eclipse.jface.action.MenuManager) IMenuManager(org.eclipse.jface.action.IMenuManager) GridData(org.eclipse.swt.layout.GridData) IMenuManager(org.eclipse.jface.action.IMenuManager) FillLayout(org.eclipse.swt.layout.FillLayout) IMenuListener(org.eclipse.jface.action.IMenuListener)

Example 18 with PageBook

use of org.eclipse.ui.part.PageBook in project linuxtools by eclipse.

the class ValgrindViewPart method createPartControl.

@Override
public void createPartControl(Composite parent) {
    // $NON-NLS-1$
    setContentDescription(Messages.getString("ValgrindViewPart.No_Valgrind_output"));
    pageBook = new PageBook(parent, SWT.NONE);
    pageBook.setLayoutData(new GridData(GridData.FILL_BOTH));
    messagesViewer = new CoreMessagesViewer(pageBook, SWT.NONE);
    dynamicViewHolder = new Composite(pageBook, SWT.NONE);
    GridLayout dynamicViewLayout = new GridLayout();
    dynamicViewLayout.marginWidth = dynamicViewLayout.marginHeight = 0;
    dynamicViewHolder.setLayout(dynamicViewLayout);
    dynamicViewHolder.setLayoutData(new GridData(GridData.FILL_BOTH));
    showCoreAction = new // $NON-NLS-1$
    Action(// $NON-NLS-1$
    Messages.getString("ValgrindViewPart.Show_Core_Action"), // $NON-NLS-1$
    IAction.AS_RADIO_BUTTON) {

        @Override
        public void run() {
            showCorePage();
        }
    };
    showToolAction = new // $NON-NLS-1$
    Action(// $NON-NLS-1$
    Messages.getString("ValgrindViewPart.Show_Tool_Action"), // $NON-NLS-1$
    IAction.AS_RADIO_BUTTON) {

        @Override
        public void run() {
            showToolPage();
        }
    };
    ValgrindUIPlugin.getDefault().setView(this);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) PageBook(org.eclipse.ui.part.PageBook) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData)

Example 19 with PageBook

use of org.eclipse.ui.part.PageBook in project tmdm-studio-se by Talend.

the class XSDEditorContentOutline method createControl.

@Override
public void createControl(Composite parent) {
    pagebook = new PageBook(parent, SWT.NONE);
    setActiveOutlinePage(activePage);
}
Also used : PageBook(org.eclipse.ui.part.PageBook)

Example 20 with PageBook

use of org.eclipse.ui.part.PageBook in project webtools.sourceediting by eclipse.

the class EditCatalogEntryDialog method createMainComponentWithToolbar.

protected Composite createMainComponentWithToolbar(Composite composite) {
    FormLayout formLayout = new FormLayout();
    formLayout.marginHeight = 5;
    formLayout.marginWidth = 5;
    composite.setLayout(formLayout);
    Label label = new Label(composite, SWT.NONE);
    FormData data = new FormData();
    data.top = new FormAttachment(0, 0);
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(100, 0);
    label.setLayoutData(data);
    toolBar = new ToolBar(composite, SWT.BORDER | SWT.FLAT | SWT.VERTICAL);
    data = new FormData();
    data.top = new FormAttachment(label, 0);
    data.left = new FormAttachment(0, 0);
    data.bottom = new FormAttachment(100, 0);
    // data.height = 250;
    // data.width = 50;
    toolBar.setLayoutData(data);
    Composite composite1 = new Composite(composite, SWT.BORDER);
    data = new FormData();
    data.top = new FormAttachment(label, 0);
    data.left = new FormAttachment(toolBar, 0, SWT.DEFAULT);
    data.right = new FormAttachment(100, 0);
    data.bottom = new FormAttachment(100, 0);
    composite1.setLayoutData(data);
    GridLayout layout = new GridLayout();
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    composite1.setLayout(layout);
    // createPageBookPanel(composite1);
    pageContainer = new PageBook(composite1, SWT.NONE);
    pageContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
    // add pages for each type of catalog element
    createCatalogEntryButton();
    createRewriteButton();
    createSuffixCatalogButton();
    createNextCatalogButton();
    createDelegateCatalogButton();
    if (toolBar.getItemCount() > 0) {
        ToolItem item = toolBar.getItem(0);
        showPage((CatalogElementPage) (item.getData()));
    }
    return composite1;
}
Also used : FormLayout(org.eclipse.swt.layout.FormLayout) FormData(org.eclipse.swt.layout.FormData) GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) PageBook(org.eclipse.ui.part.PageBook) Label(org.eclipse.swt.widgets.Label) ToolBar(org.eclipse.swt.widgets.ToolBar) GridData(org.eclipse.swt.layout.GridData) FormAttachment(org.eclipse.swt.layout.FormAttachment) ToolItem(org.eclipse.swt.widgets.ToolItem)

Aggregations

PageBook (org.eclipse.ui.part.PageBook)26 GridData (org.eclipse.swt.layout.GridData)12 Composite (org.eclipse.swt.widgets.Composite)10 GridLayout (org.eclipse.swt.layout.GridLayout)6 Label (org.eclipse.swt.widgets.Label)5 FormToolkit (org.eclipse.ui.forms.widgets.FormToolkit)4 IToolBarManager (org.eclipse.jface.action.IToolBarManager)3 FillLayout (org.eclipse.swt.layout.FillLayout)3 Control (org.eclipse.swt.widgets.Control)3 ExpandableComposite (org.eclipse.ui.forms.widgets.ExpandableComposite)3 Action (org.eclipse.jface.action.Action)2 IMenuManager (org.eclipse.jface.action.IMenuManager)2 MenuManager (org.eclipse.jface.action.MenuManager)2 ToolBarManager (org.eclipse.jface.action.ToolBarManager)2 TextSearchControl (org.eclipse.mylyn.commons.workbench.search.TextSearchControl)2 CLabel (org.eclipse.swt.custom.CLabel)2 SashForm (org.eclipse.swt.custom.SashForm)2 ScrolledComposite (org.eclipse.swt.custom.ScrolledComposite)2 ControlAdapter (org.eclipse.swt.events.ControlAdapter)2 ControlEvent (org.eclipse.swt.events.ControlEvent)2