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


Java IObservableList类代码示例

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


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

示例1: MouseWheelZoomer

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
public MouseWheelZoomer ( final ChartRenderer chart, final IObservableList/*XAxis*/xAxis, final IObservableList/*YAxis*/yAxis )
{
    super ( xAxis, yAxis );

    this.chart = chart;

    this.chart.addDisposeListener ( new DisposeListener () {

        @Override
        public void onDispose ()
        {
            dispose ();
        }
    } );
    this.chart.addMouseWheelListener ( this );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:17,代码来源:MouseWheelZoomer.java

示例2: MouseTransformer

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
public MouseTransformer ( final ChartRenderer chartArea, final IObservableList/*XAxis*/xAxis, final IObservableList/*YAxis*/yAxis )
{
    super ( xAxis, yAxis );

    this.chartArea = chartArea;

    chartArea.addDisposeListener ( new DisposeListener () {

        @Override
        public void onDispose ()
        {
            dispose ();
        }
    } );

    chartArea.addMouseListener ( this );
    chartArea.addMouseMoveListener ( this );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:19,代码来源:MouseTransformer.java

示例3: LegendRenderer

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
public LegendRenderer ( final ChartRenderer renderer, final IObservableList/*SeriesInformation*/informations )
{
    this.renderer = renderer;
    this.infos = informations;

    setTimestampFormat ( null );

    this.infos.addListChangeListener ( this.listener = new IListChangeListener () {

        @Override
        public void handleListChange ( final ListChangeEvent event )
        {
            LegendRenderer.this.processListChange ( event.diff );
        }
    } );

    // add initial entries

    int i = 0;
    for ( final Object o : this.infos )
    {
        addEntry ( i, o );
        i++;
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:26,代码来源:LegendRenderer.java

示例4: createObservable

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
@Override
public IObservable createObservable ( final Object target )
{
    logger.debug ( "createObservable - {}", target );

    if ( target instanceof IObservableList )
    {
        return Observables.proxyObservableList ( (IObservableList)target );
    }
    else if ( target instanceof KeyProviderFactory )
    {
        return Observables.proxyObservableList ( ( (KeyProviderFactory)target ).getKeyProviders () );
    }
    else if ( target instanceof KeyProvider )
    {
        return Observables.proxyObservableList ( ( (KeyProvider)target ).getKeys () );
    }
    return null;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:20,代码来源:FactoryImpl.java

示例5: createObservable

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
public IObservable createObservable(final Object target)
{
	if (target instanceof IObservableList)
	{
		return (IObservable) target;
	} else if (target instanceof BTSProject)
	{
		return project_multi.observe(target);
	} else if (target instanceof BTSProjectDBCollection)
	{
		return coll_multi.observe(target);
	} else if (target instanceof BTSDBCollectionRoleDesc)
	{
		return roleMembers_multi.observe(target);
	}

	return null;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:19,代码来源:ProjectDBCollectionTreeFactory.java

示例6: initBindings

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

示例7: initDataBindings

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
protected DataBindingContext initDataBindings() {
	DataBindingContext bindingContext = new DataBindingContext();
	//
	ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
	IObservableMap[] observeMaps = EMFEditObservables.observeMaps(editingDomain, listContentProvider.getKnownElements(), new EStructuralFeature[]{Literals.ENTITY__NAME});
	tableViewer.setLabelProvider(new ObservableMapLabelProvider(observeMaps));
	tableViewer.setContentProvider(listContentProvider);
	//
	IObservableList architectureCloudProvidersObserveList = EMFEditObservables.observeList(Realm.getDefault(), editingDomain, architecture, ArchitecturePackage.Literals.ARCHITECTURE__CLOUD_ENVIRONMENTS);
	tableViewer.setInput(architectureCloudProvidersObserveList);
	//
	IObservableValue observeSingleSelectionTableViewer = ViewerProperties.singleSelection().observe(tableViewer);
	IObservableValue cloudProviderCloudProviderModelObserveValue = BeanProperties.value("cloudProvider").observe(cloudProviderModel);
	bindingContext.bindValue(observeSingleSelectionTableViewer, cloudProviderCloudProviderModelObserveValue, null, null);
	//
	return bindingContext;
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:18,代码来源:CloudProviderListComposite.java

示例8: reloadOnValueChange

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
public void reloadOnValueChange(EObject eobject, EStructuralFeature feature){
	
	long id = (((long)eobject.hashCode()) << 32) + feature.getFeatureID();
	
	if(externalObservables.containsKey(id)){
		return;
	}
	
	TransactionalEditingDomain ed = TransactionalEditingDomain.Factory.INSTANCE.getEditingDomain(
       		eobject.eResource().getResourceSet());
	
	IObservableList o = EMFEditObservables.observeList(ed, eobject, feature);
	o.addChangeListener(new IChangeListener() {
		
		@Override
		public void handleChange(ChangeEvent event) {
			reload();
		}
	});
	
	externalObservables.put(id, o);
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:23,代码来源:TreeRow.java

示例9: initPaaS

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
private void initPaaS (Specification specification)
{
	List<? extends PlatformServiceDescriptor> paaSDescriptors = null;

	if (specification instanceof CloudSpecification)
		paaSDescriptors = OverviewHelper.getPaaSRuntimeDescriptors((CloudSpecification)specification);
	else if (specification instanceof ServiceSpecification)
		paaSDescriptors = OverviewHelper.getPlatformDescriptors((ServiceSpecification)specification, false, true);

	ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
	IObservableMap observeMap = PojoObservables.observeMap(listContentProvider.getKnownElements(), ProvidedPlatformRuntimeServiceDescriptor.class, "name");
	cvPaaS.setLabelProvider(new ObservableMapLabelProvider(observeMap));
	cvPaaS.setContentProvider(listContentProvider);
	IObservableList selfList = Properties.selfList(CloudSpecification.class).observe(paaSDescriptors);
	cvPaaS.setInput(selfList);
	
	// set default selection
	if (!paaSDescriptors.isEmpty())
	{
		final ISelection selection = new StructuredSelection(paaSDescriptors.get(0));
		cvPaaS.setSelection(selection);
	}
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:24,代码来源:DeploymentComposite.java

示例10: createListSection

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
public void createListSection ( final ScrolledForm form, final ConfigurationEditorInput input, final String attribute, final String label, final String delimiter, final String pattern )
{
    final IObservableList list = StringSplitListObservable.observeString ( Observables.observeMapEntry ( input.getDataMap (), attribute, String.class ), delimiter, pattern );

    // section

    final Section section = this.toolkit.createSection ( form.getBody (), ExpandableComposite.TITLE_BAR );
    section.setText ( label );

    final Composite client = this.toolkit.createComposite ( section, SWT.NONE );
    section.setClient ( client );
    this.toolkit.paintBordersFor ( client );

    client.setLayout ( new GridLayout ( 1, true ) );
    final GridData gd = new GridData ( GridData.FILL_BOTH );
    gd.horizontalSpan = 2;
    section.setLayoutData ( gd );

    // fields
    final ListViewer viewer = new ListViewer ( client );

    viewer.setContentProvider ( new ObservableListContentProvider () );
    viewer.setInput ( list );

    viewer.getControl ().setLayoutData ( new GridData ( GridData.FILL_BOTH ) );

    viewer.setSorter ( new ViewerSorter () );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:29,代码来源:ConfigurationFormToolkit.java

示例11: ChartContextImpl

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
public ChartContextImpl ( final AxisLocator<XAxis, XAxisViewer> xAxisLocator, final AxisLocator<YAxis, YAxisViewer> yAxisLocator, final ExtensionSpaceProvider extensionSpaceProvider, final ChartRenderer chartRenderer, final Chart chart, final ResetHandler resetHandler, final IObservableList informations )
{
    this.resetHandler = resetHandler;
    this.xAxisLocator = xAxisLocator;
    this.yAxisLocator = yAxisLocator;
    this.extensionSpaceProvider = extensionSpaceProvider;
    this.chartRenderer = chartRenderer;
    this.chart = chart;
    this.informations = informations;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:11,代码来源:ChartContextImpl.java

示例12: CompositeQualityInput

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
public CompositeQualityInput ( final ChartViewer viewer, final ChartRenderer chartRenderer, final Realm realm, final XAxis xAxis, final YAxis yAxis, final IObservableList inputs )
{
    this.inputs = inputs;
    this.chartRenderer = chartRenderer;

    this.data = new MergedSeries ( this.sources, realm, xAxis, yAxis );

    this.inputs.addListChangeListener ( this.listener = new IListChangeListener () {

        @Override
        public void handleListChange ( final ListChangeEvent event )
        {
            handleDiff ( event.diff );
        }
    } );
    handleDiff ( Diffs.computeListDiff ( Collections.EMPTY_LIST, inputs ) );

    // this.renderer = new StepRenderer ( chartRenderer, this.data );
    this.renderer = new QualityRenderer ( chartRenderer, this.data ) {
        @Override
        protected boolean checkQuality ( final boolean hasData, final Double value )
        {
            if ( !hasData || value == null )
            {
                return false;
            }

            return CompositeQualityInput.this.checkQuality ( value );
        }
    };
    this.chartRenderer.addRenderer ( this.renderer );

    attachHover ( viewer, xAxis );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:35,代码来源:CompositeQualityInput.java

示例13: getTargets

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
@Override
public IObservableList getTargets() {
  if (isDisposed()) {
    return Observables.emptyObservableList();
  }
  return super.getTargets();
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:8,代码来源:FixedMultiValidator.java

示例14: createObservable

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
public IObservable createObservable(final Object target)
{
	if (target instanceof IObservableList)
	{
		return (IObservable) target;
	} else if (target instanceof BTSConfig)
	{
		return multi.observe(target);
	}

	return null;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:13,代码来源:TreeFactoryImpl2.java

示例15: removeDirtyListenersToContext

import org.eclipse.core.databinding.observable.list.IObservableList; //导入依赖的package包/类
public void removeDirtyListenersToContext() {
	IObservableList bindings = bindingContext.getBindings();
	for (Object o : bindings) {
		Binding b = (Binding) o;
		b.getTarget().removeChangeListener(listener);
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:8,代码来源:ADataAdapterComposite.java


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