当前位置: 首页>>代码示例>>Java>>正文


Java DataBindingContext.bindList方法代码示例

本文整理汇总了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);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:21,代码来源:N4MFWizardTestedProjectPage.java

示例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 );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:16,代码来源:MouseControllerImpl.java

示例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));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:7,代码来源:N4MFWizardNewProjectCreationPage.java


注:本文中的org.eclipse.core.databinding.DataBindingContext.bindList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。