use of org.eclipse.wb.internal.core.databinding.ui.editor.UiContentProviderComposite in project windowbuilder by eclipse.
the class BindDialog method createDialogArea.
// //////////////////////////////////////////////////////////////////////////
//
// GUI
//
// //////////////////////////////////////////////////////////////////////////
@Override
protected Control createDialogArea(Composite parent) {
// dialog area
final ScrolledComposite container = new ScrolledComposite((Composite) super.createDialogArea(parent), SWT.BORDER | SWT.V_SCROLL);
container.setExpandHorizontal(true);
//
List<IUiContentProvider> providers = ExecutionUtils.runObjectLog(new RunnableObjectEx<List<IUiContentProvider>>() {
@Override
public List<IUiContentProvider> runObject() throws Exception {
return m_databindingsProvider.getContentProviders(m_binding, BindDialog.this);
}
}, Collections.<IUiContentProvider>emptyList());
m_providerComposite = new UiContentProviderComposite(this, providers, container, SWT.NONE);
container.setContent(m_providerComposite);
container.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent e) {
Rectangle bounds = container.getClientArea();
Point size = m_providerComposite.computeSize(bounds.width, SWT.DEFAULT);
m_providerComposite.setBounds(bounds.x, bounds.y, size.x, size.y);
}
});
GridDataFactory.create(container).fill().grab();
//
return container;
}
use of org.eclipse.wb.internal.core.databinding.ui.editor.UiContentProviderComposite in project windowbuilder by eclipse.
the class BindWizardPage method calculateFinish.
public void calculateFinish() {
if (m_providerComposite != null) {
m_providerComposite.dispose();
m_providerComposite = null;
}
List<IUiContentProvider> providers = ExecutionUtils.runObjectLog(new RunnableObjectEx<List<IUiContentProvider>>() {
@Override
public List<IUiContentProvider> runObject() throws Exception {
m_binding = m_firstPage.getBinding();
return m_context.provider.getContentProviders(m_binding, BindWizardPage.this);
}
}, Collections.<IUiContentProvider>emptyList());
m_providerComposite = new UiContentProviderComposite(this, providers, m_composite, SWT.NONE);
// initial state
ExecutionUtils.runLog(new RunnableEx() {
@Override
public void run() throws Exception {
m_providerComposite.performInitialize();
}
});
}
use of org.eclipse.wb.internal.core.databinding.ui.editor.UiContentProviderComposite 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();
}
});
}
use of org.eclipse.wb.internal.core.databinding.ui.editor.UiContentProviderComposite in project windowbuilder by eclipse.
the class SimpleBindDialog method createDialogArea.
// //////////////////////////////////////////////////////////////////////////
//
// GUI
//
// //////////////////////////////////////////////////////////////////////////
@Override
protected Control createDialogArea(Composite parent) {
// dialog area
Composite container = (Composite) super.createDialogArea(parent);
//
m_providerComposite = new UiContentProviderComposite(this, m_providers, container, SWT.NONE);
GridDataFactory.create(m_providerComposite).fill().grab();
//
if (m_title != null) {
setTitle(m_title);
}
if (m_message != null) {
setMessage(m_message);
}
//
return container;
}
Aggregations