本文整理汇总了Java中org.eclipse.core.databinding.DataBindingContext.bindList方法的典型用法代码示例。如果您正苦于以下问题:Java DataBindingContext.bindList方法的具体用法?Java DataBindingContext.bindList怎么用?Java DataBindingContext.bindList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.core.databinding.DataBindingContext
的用法示例。
在下文中一共展示了DataBindingContext.bindList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createControl
import org.eclipse.core.databinding.DataBindingContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void createControl(Composite parent) {
Composite listComposite = new Composite(parent, NONE);
listComposite.setLayout(new FillLayout());
ListViewer projectListViewer = new ListViewer(listComposite, SWT.BORDER | SWT.MULTI);
projectListViewer.setContentProvider(ArrayContentProvider.getInstance());
projectListViewer.setInput(getNonTestProjects());
// Data binding
DataBindingContext databindingContext = new DataBindingContext();
parent.addDisposeListener(e -> databindingContext.dispose());
databindingContext.bindList(ViewersObservables.observeMultiSelection(projectListViewer),
PojoProperties.list(N4MFProjectInfo.class, N4MFProjectInfo.TESTED_PROJECT_PROP_NAME)
.observe(projectInfo));
setControl(listComposite);
}
示例2: MouseControllerImpl
import org.eclipse.core.databinding.DataBindingContext; //导入方法依赖的package包/类
public MouseControllerImpl ( final ControllerManager controllerManager, final ChartContext chartContext, final MouseController controller )
{
this.chartContext = chartContext;
final Chart chart = chartContext.getChart ();
final DataBindingContext ctx = controllerManager.getContext ();
ctx.bindList ( this.selectedXAxis, EMFObservables.observeList ( chart, ChartPackage.Literals.CHART__SELECTED_XAXIS ), null, new UpdateListStrategy ().setConverter ( new AxisConverter<> ( XAxis.class, org.eclipse.scada.chart.XAxis.class, chartContext.getxAxisLocator () ) ) );
ctx.bindList ( this.selectedYAxis, EMFObservables.observeList ( chart, ChartPackage.Literals.CHART__SELECTED_YAXIS ), null, new UpdateListStrategy ().setConverter ( new AxisConverter<> ( YAxis.class, org.eclipse.scada.chart.YAxis.class, chartContext.getyAxisLocator () ) ) );
this.mouseTransformer = new MouseTransformer ( this.chartContext.getChartRenderer (), this.selectedXAxis, this.selectedYAxis );
this.mouseDragZoomer = new MouseDragZoomer ( this.chartContext.getChartRenderer (), this.selectedXAxis, this.selectedYAxis );
this.mouseWheelZoomer = new MouseWheelZoomer ( this.chartContext.getChartRenderer (), this.selectedXAxis, this.selectedYAxis );
}
示例3: initApiViewerBinding
import org.eclipse.core.databinding.DataBindingContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void initApiViewerBinding(DataBindingContext dbc, ListViewer apiViewer) {
dbc.bindList(
ViewersObservables.observeMultiSelection(apiViewer),
PojoProperties.list(N4MFProjectInfo.class, IMPLEMENTED_PROJECTS_PROP_NAME).observe(projectInfo));
}