use of org.eclipse.wb.internal.core.databinding.ui.editor.IUiContentProvider in project windowbuilder by eclipse.
the class TabContainerUiContentProvider method configure.
protected final void configure() {
int count = m_folder.getItemCount();
for (int i = 0; i < count; i++) {
CTabItem tabItem = m_folder.getItem(i);
IUiContentProvider contentProvider = (IUiContentProvider) tabItem.getData();
configute(tabItem, i, contentProvider);
}
}
use of org.eclipse.wb.internal.core.databinding.ui.editor.IUiContentProvider in project windowbuilder by eclipse.
the class TabContainerUiContentProvider method saveToObject.
@Override
public void saveToObject() throws Exception {
List<IUiContentProvider> providers = Lists.newArrayList();
if (!m_showEmptyPage) {
int count = m_folder.getItemCount();
for (int i = 0; i < count; i++) {
IUiContentProvider provider = (IUiContentProvider) m_folder.getItem(i).getData();
providers.add(provider);
provider.saveToObject();
}
}
saveToObject(providers);
}
use of org.eclipse.wb.internal.core.databinding.ui.editor.IUiContentProvider 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.IUiContentProvider 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.IUiContentProvider in project windowbuilder by eclipse.
the class JTableColumnContainerUiContentProvider method updateFromObject.
// //////////////////////////////////////////////////////////////////////////
//
// Update
//
// //////////////////////////////////////////////////////////////////////////
public void updateFromObject() throws Exception {
List<IUiContentProvider> providers = Lists.newArrayList();
for (ColumnBindingInfo binding : m_binding.getColumns()) {
providers.add(new UIContentContainer<ColumnBindingInfo>(binding, m_bindings, Messages.JTableColumnContainerUiContentProvider_column, m_provider));
}
updateFromObject(providers);
}
Aggregations