Search in sources :

Example 6 with PageBook

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

the class DockerExplorerView method createPartControl.

@Override
public void createPartControl(final Composite parent) {
    final FormToolkit toolkit = new FormToolkit(parent.getDisplay());
    this.pageBook = new PageBook(parent, SWT.NONE);
    this.connectionsPane = createConnectionsPane(pageBook, toolkit);
    this.explanationsPane = createExplanationPane(pageBook, toolkit);
    showConnectionsOrExplanations();
    this.containersAndImagesSearchFilter = getContainersAndImagesSearchFilter();
    getCommonViewer().addFilter(containersAndImagesSearchFilter);
    DockerConnectionManager.getInstance().addConnectionManagerListener(this);
    if (DockerConnectionManager.getInstance().getConnections().length > 0) {
        IDockerConnection conn = DockerConnectionManager.getInstance().getConnections()[0];
        getCommonViewer().setSelection(new StructuredSelection(conn));
    }
}
Also used : FormToolkit(org.eclipse.ui.forms.widgets.FormToolkit) PageBook(org.eclipse.ui.part.PageBook) IDockerConnection(org.eclipse.linuxtools.docker.core.IDockerConnection) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection)

Example 7 with PageBook

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

the class DockerImageHierarchyView method createPartControl.

@Override
public void createPartControl(final Composite parent) {
    final FormToolkit toolkit = new FormToolkit(parent.getDisplay());
    this.pageBook = new PageBook(parent, SWT.NONE);
    this.hierarchyPane = createHierarchyPane(pageBook, toolkit);
    this.explanationsPane = createExplanationPane(pageBook, toolkit);
    showHierarchyOrExplanations();
}
Also used : FormToolkit(org.eclipse.ui.forms.widgets.FormToolkit) PageBook(org.eclipse.ui.part.PageBook)

Example 8 with PageBook

use of org.eclipse.ui.part.PageBook in project jbosstools-hibernate by jbosstools.

the class DiagramContentOutlinePage method createControl.

/**
 * @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
 */
public void createControl(Composite parent) {
    pageBook = new PageBook(parent, SWT.NONE);
    outline = getViewer().createControl(pageBook);
    overview = new Canvas(pageBook, SWT.NONE);
    pageBook.showPage(outline);
    configureOutlineViewer();
    hookOutlineViewer();
    initializeOutlineViewer();
}
Also used : PageBook(org.eclipse.ui.part.PageBook) Canvas(org.eclipse.swt.widgets.Canvas)

Example 9 with PageBook

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

the class MultiPageEditorContentOutlinePage method createControl.

@Override
public void createControl(Composite parent) {
    book = new PageBook(parent, SWT.NONE);
    emptyPage = new MessagePage();
    emptyPage.createControl(book);
    emptyPage.setMessage(UIText.MultiPageEditorContentOutlinePage_NoOutline);
    Object activePage = editorPart.getSelectedPage();
    if (activePage instanceof IEditorPart) {
        showPage(createOutlinePage((IEditorPart) activePage));
    } else {
        currentPage = emptyPage;
        book.showPage(emptyPage.getControl());
    }
    pageListener = (event) -> {
        Object newPage = event.getSelectedPage();
        if (!(newPage instanceof IEditorPart)) {
            showPage(emptyPage);
            return;
        }
        IPage newOutlinePage = pages.get(newPage);
        if (newOutlinePage == null) {
            newOutlinePage = createOutlinePage((IEditorPart) newPage);
        }
        showPage(newOutlinePage);
    };
    editorPart.addPageChangedListener(pageListener);
}
Also used : IPage(org.eclipse.ui.part.IPage) PageBook(org.eclipse.ui.part.PageBook) MessagePage(org.eclipse.ui.part.MessagePage) IEditorPart(org.eclipse.ui.IEditorPart)

Example 10 with PageBook

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

the class ServersView2 method createPartControl.

@Override
public void createPartControl(Composite parent) {
    // Add PageBook as parent composite
    FormToolkit toolkit = new FormToolkit(parent.getDisplay());
    book = new PageBook(parent, SWT.NONE);
    super.createPartControl(book);
    // Main page for the Servers tableViewer
    mainPage = getCommonViewer().getControl();
    // Page prompting to define a new server
    noServersPage = createDefaultPage(toolkit);
    book.showPage(mainPage);
    IContextService contextSupport = (IContextService) getSite().getService(IContextService.class);
    contextSupport.activateContext(SERVERS_VIEW_CONTEXT);
    deferInitialization();
}
Also used : FormToolkit(org.eclipse.ui.forms.widgets.FormToolkit) PageBook(org.eclipse.ui.part.PageBook) IContextService(org.eclipse.ui.contexts.IContextService)

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