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


Java UpdateListStrategy类代码示例

本文整理汇总了Java中org.eclipse.core.databinding.UpdateListStrategy的典型用法代码示例。如果您正苦于以下问题:Java UpdateListStrategy类的具体用法?Java UpdateListStrategy怎么用?Java UpdateListStrategy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


UpdateListStrategy类属于org.eclipse.core.databinding包,在下文中一共展示了UpdateListStrategy类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initBindings

import org.eclipse.core.databinding.UpdateListStrategy; //导入依赖的package包/类
public void initBindings(IObservableList modelObservable){
	
	if(currentObservable == modelObservable){
		return;
	}
	
	if(bindingContext != null){
		bindingContext.dispose();
		bindingContext = null;
	}
	bindingContext = new DataBindingContext();
	
	CompositeContainerChildProperty childrenProp = new CompositeContainerChildProperty();
	IObservableList childObs = childrenProp.observe(this);
	
	IConverter[] converter = getCompositeContainerChildConverter(modelObservable.getElementType());
	UpdateListStrategy t2mStrategy = new UpdateListStrategy(UpdateListStrategy.POLICY_UPDATE);
	t2mStrategy.setConverter(converter[0]);
	
	UpdateListStrategy m2tStrategy = new UpdateListStrategy(UpdateListStrategy.POLICY_UPDATE);
	m2tStrategy.setConverter(converter[1]);
	
	bindingContext.bindList(childObs, modelObservable, t2mStrategy, m2tStrategy);
	bindingContext.updateTargets();
	currentObservable = modelObservable;
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:27,代码来源:ListComposite.java

示例2: MouseControllerImpl

import org.eclipse.core.databinding.UpdateListStrategy; //导入依赖的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


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