Search in sources :

Example 1 with PageListenerWrapper

use of org.eclipse.wb.internal.core.databinding.ui.editor.PageListenerWrapper in project windowbuilder by eclipse.

the class TreeInputElementUiContentProvider method createContent.

@Override
public void createContent(Composite parent, int columns) {
    // create folder
    m_tabFolder = new TabFolder(parent, SWT.NONE);
    GridDataFactory.create(m_tabFolder).fill().grab().spanH(columns);
    // create designer page
    m_designerPageListener = new PageListenerWrapper(m_pageListener, m_completeListener);
    // 
    m_designerComposite = new UiContentProviderComposite(m_designerPageListener, createDesignerProviders(), m_tabFolder, SWT.NONE);
    TabFactory.item(m_tabFolder).text(Messages.TreeInputElementUiContentProvider_designerSupport).image(CHECK_IMAGE).control(m_designerComposite);
    // create jface page
    m_jfacePageListener = new PageListenerWrapper(m_pageListener, m_completeListener);
    // 
    m_jfaceComposite = new UiContentProviderComposite(m_jfacePageListener, createJFaceProviders(), m_tabFolder, SWT.NONE);
    TabFactory.item(m_tabFolder).text(Messages.TreeInputElementUiContentProvider_jfaceSupport).image(UNCHECK_IMAGE).control(m_jfaceComposite);
    // 
    m_tabFolder.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            handleTabSelection();
            calculateFinish();
        }
    });
}
Also used : PageListenerWrapper(org.eclipse.wb.internal.core.databinding.ui.editor.PageListenerWrapper) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) TabFolder(org.eclipse.swt.widgets.TabFolder) SelectionEvent(org.eclipse.swt.events.SelectionEvent) UiContentProviderComposite(org.eclipse.wb.internal.core.databinding.ui.editor.UiContentProviderComposite)

Aggregations

SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 TabFolder (org.eclipse.swt.widgets.TabFolder)1 PageListenerWrapper (org.eclipse.wb.internal.core.databinding.ui.editor.PageListenerWrapper)1 UiContentProviderComposite (org.eclipse.wb.internal.core.databinding.ui.editor.UiContentProviderComposite)1