本文整理汇总了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;
}
示例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 );
}