Search in sources :

Example 21 with PageBook

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

the class EditCatalogEntryDialog method createMainComponent.

protected Composite createMainComponent(Composite composite) {
    if (// "edit" action
    fCatalogElement != null) {
        Composite composite1 = new Composite(composite, SWT.NONE);
        GridData data = new GridData(GridData.FILL_BOTH);
        composite1.setLayoutData(data);
        GridLayout layout = new GridLayout();
        composite1.setLayout(layout);
        pageContainer = new PageBook(composite1, SWT.NONE);
        pageContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
        if (fCatalogElement.getType() == ICatalogElement.TYPE_ENTRY) {
            CatalogElementPage entryPage = new CatalogEntryPage();
            entryPage.createControl(pageContainer);
            showPage(entryPage);
        } else if (fCatalogElement.getType() == ICatalogElement.TYPE_NEXT_CATALOG) {
            CatalogElementPage nextCatalogPage = new NextCatalogPage();
            nextCatalogPage.createControl(pageContainer);
            showPage(nextCatalogPage);
        } else if (fCatalogElement.getType() == ICatalogElement.TYPE_DELEGATE) {
            DelegateCatalogPage delegateCatalogPage = new DelegateCatalogPage();
            delegateCatalogPage.createControl(pageContainer);
            showPage(delegateCatalogPage);
        } else if (fCatalogElement.getType() == ICatalogElement.TYPE_SUFFIX) {
            SuffixEntryPage suffixEntryPage = new SuffixEntryPage();
            suffixEntryPage.createControl(pageContainer);
            showPage(suffixEntryPage);
        } else if (fCatalogElement.getType() == ICatalogElement.TYPE_REWRITE) {
            RewriteEntryPage rewriteEntryPage = new RewriteEntryPage();
            rewriteEntryPage.createControl(pageContainer);
            showPage(rewriteEntryPage);
        }
        return composite1;
    }
    return createMainComponentWithToolbar(composite);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) PageBook(org.eclipse.ui.part.PageBook) GridData(org.eclipse.swt.layout.GridData)

Example 22 with PageBook

use of org.eclipse.ui.part.PageBook in project mdw-designer by CenturyLinkCloud.

the class AutomatedTestView method createSashForm.

private SashForm createSashForm(Composite parent) {
    sashForm = new SashForm(parent, SWT.HORIZONTAL);
    ViewForm results = new ViewForm(sashForm, SWT.NONE);
    PageBook viewerBook = new PageBook(results, SWT.BORDER);
    treeViewer = new TreeViewer(viewerBook, SWT.V_SCROLL | SWT.SINGLE);
    treeViewer.setUseHashlookup(true);
    treeViewer.setContentProvider(contentProvider);
    treeViewer.setLabelProvider(new AutomatedTestLabelProvider());
    treeViewer.addOpenListener(new IOpenListener() {

        public void open(OpenEvent event) {
            actionGroup.getActionHandler().open(selectedItem);
        }
    });
    treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent event) {
            handleSelectionChanged((IStructuredSelection) event.getSelection());
        }
    });
    viewerBook.showPage(treeViewer.getTree());
    results.setContent(viewerBook);
    ViewForm output = new ViewForm(sashForm, SWT.NONE);
    outputText = new Text(output, SWT.BORDER | SWT.READ_ONLY | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
    outputText.setFont(JFaceResources.getTextFont());
    output.setContent(outputText);
    sashForm.setWeights(new int[] { 33, 67 });
    return sashForm;
}
Also used : SashForm(org.eclipse.swt.custom.SashForm) ViewForm(org.eclipse.swt.custom.ViewForm) IOpenListener(org.eclipse.jface.viewers.IOpenListener) PageBook(org.eclipse.ui.part.PageBook) TreeViewer(org.eclipse.jface.viewers.TreeViewer) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) Text(org.eclipse.swt.widgets.Text) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) OpenEvent(org.eclipse.jface.viewers.OpenEvent)

Example 23 with PageBook

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

the class GenericGeneratorsComposite method initializeLayout.

@Override
protected void initializeLayout(Composite container) {
    // List pane
    this.listPane = this.addListPane(container);
    // Property pane
    PageBook pageBook = new PageBook(container, SWT.NULL);
    pageBook.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    // Named GenericGenerator property pane
    this.genericGeneratorPane = this.buildGenericGeneratorComposite(pageBook);
    installPaneSwitcher(pageBook);
}
Also used : PageBook(org.eclipse.ui.part.PageBook) GridData(org.eclipse.swt.layout.GridData)

Example 24 with PageBook

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

the class HibernateQueriesComposite method initializeLayout.

@Override
protected void initializeLayout(Composite container) {
    // List pane
    addListPane(container);
    // this.listPane = addListPane(container);
    // Property pane
    PageBook pageBook = new PageBook(container, SWT.NULL);
    pageBook.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    // Hibernate Named Query property pane
    this.hibernateNamedQueryPane = new HibernateNamedQueryPropertyComposite(this, buildHibernateNamedQueryHolder(), pageBook);
    // Hibernate Named Native Query property pane
    this.hibernateNamedNativeQueryPane = new HibernateNamedNativeQueryPropertyComposite(this, buildHibernateNamedNativeQueryHolder(), pageBook);
    // Named Query property pane
    this.namedQueryPane = this.buildNamedQueryPropertyComposite(pageBook);
    // Named Native Query property pane
    this.namedNativeQueryPane = new NamedNativeQueryPropertyComposite(this, buildNamedNativeQueryHolder(), pageBook);
    installPaneSwitcher(pageBook);
}
Also used : PageBook(org.eclipse.ui.part.PageBook) GridData(org.eclipse.swt.layout.GridData) NamedNativeQueryPropertyComposite(org.eclipse.jpt.jpa.ui.internal.details.NamedNativeQueryPropertyComposite)

Example 25 with PageBook

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

the class TypeDefsComposite method initializeLayout.

@Override
protected void initializeLayout(Composite container) {
    // List pane
    // this.listPane = this.addListPane(container);
    addListPane(container);
    // Property pane
    PageBook pageBook = new PageBook(container, SWT.NULL);
    pageBook.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    // Named JavaTypeDef property pane
    this.typeDefPane = this.buildTypeDefPropertyComposite(pageBook);
    installPaneSwitcher(pageBook);
}
Also used : PageBook(org.eclipse.ui.part.PageBook) GridData(org.eclipse.swt.layout.GridData)

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