Search in sources :

Example 1 with ICompositeDialogPage

use of org.jkiss.dbeaver.ui.ICompositeDialogPage in project dbeaver by serge-rider.

the class MultiPageWizardDialog method addPage.

private TreeItem addPage(TreeItem parentItem, IDialogPage page, Point maxSize) {
    TreeItem item = parentItem == null ? new TreeItem(pagesTree, SWT.NONE) : new TreeItem(parentItem, SWT.NONE);
    item.setText(page.getTitle());
    item.setData(page);
    // Ad sub pages
    if (page instanceof ICompositeDialogPage) {
        IDialogPage[] subPages = ((ICompositeDialogPage) page).getSubPages(true, resizeHasOccurred);
        if (!ArrayUtils.isEmpty(subPages)) {
            for (IDialogPage subPage : subPages) {
                addPage(item, subPage, maxSize);
            }
        // item.setExpanded(true);
        }
    }
    return item;
}
Also used : ICompositeDialogPage(org.jkiss.dbeaver.ui.ICompositeDialogPage) IDialogPage(org.eclipse.jface.dialogs.IDialogPage)

Example 2 with ICompositeDialogPage

use of org.jkiss.dbeaver.ui.ICompositeDialogPage in project dbeaver by dbeaver.

the class MultiPageWizardDialog method addPage.

private TreeItem addPage(TreeItem parentItem, IDialogPage page, Point maxSize) {
    TreeItem item = parentItem == null ? new TreeItem(pagesTree, SWT.NONE) : new TreeItem(parentItem, SWT.NONE);
    item.setText(page.getTitle());
    item.setData(page);
    // Ad sub pages
    if (page instanceof ICompositeDialogPage) {
        IDialogPage[] subPages = ((ICompositeDialogPage) page).getSubPages(true, resizeHasOccurred);
        if (!ArrayUtils.isEmpty(subPages)) {
            for (IDialogPage subPage : subPages) {
                addPage(item, subPage, maxSize);
            }
        // item.setExpanded(true);
        }
    }
    return item;
}
Also used : ICompositeDialogPage(org.jkiss.dbeaver.ui.ICompositeDialogPage) IDialogPage(org.eclipse.jface.dialogs.IDialogPage)

Aggregations

IDialogPage (org.eclipse.jface.dialogs.IDialogPage)2 ICompositeDialogPage (org.jkiss.dbeaver.ui.ICompositeDialogPage)2