• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IObservableSet类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: removeSource

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
protected void removeSource ( final IObservableSet observableSet )
{
    if ( observableSet == null )
    {
        return;
    }

    for ( final Iterator<?> it = observableSet.iterator (); it.hasNext (); )
    {
        removeListenerFrom ( it.next () );
    }
    observableSet.removeSetChangeListener ( this.listener );

    if ( !this.disposed )
    {
        this.sources.remove ( observableSet );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:19,代码来源:ListeningLabelProvider.java


示例2: dispose

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
@Override
public void dispose ()
{
    if ( this.disposed )
    {
        return;
    }

    this.disposed = true;

    for ( final IObservableSet set : this.sources )
    {
        if ( !set.isDisposed () )
        {
            for ( final Iterator<?> iter = set.iterator (); iter.hasNext (); )
            {
                removeListenerFrom ( iter.next () );
            }
        }
        set.removeSetChangeListener ( this.listener );
    }
    super.dispose ();
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:24,代码来源:ListeningLabelProvider.java


示例3: setInput

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
/**
 * Set the new input set
 * <p>
 * The old input set will be returned but not disposed
 * </p>
 * 
 * @param input
 *            the new input set or <code>null</code> to set none
 * @return the old input set or <code>null</code> if none was present
 */
public IObservableSet setInput ( final IObservableSet input )
{
    final IObservableSet oldInput = this.input;

    if ( this.input != null )
    {
        detachInput ();
    }

    if ( this.viewer != null && input != null )
    {
        this.input = input;
        attachInput ();
    }

    return oldInput;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:28,代码来源:RealTimeGroupTab.java


示例4: update

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
private void update ()
{
    this.unionSet.removeSetChangeListener ( this.setListener );
    this.unionSet.dispose ();
    this.descriptors.clear ();

    final List<IObservableSet> childSets = new LinkedList<IObservableSet> ();

    for ( final DetailComponent component : this.subs )
    {
        childSets.add ( component.getDescriptors () );
    }

    if ( childSets.isEmpty () )
    {
        this.unionSet = Observables.emptyObservableSet ();
    }
    else
    {
        this.unionSet = new UnionSet ( childSets.toArray ( new IObservableSet[childSets.size ()] ) );
    }

    this.unionSet.addSetChangeListener ( this.setListener );
    this.descriptors.addAll ( this.unionSet );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:26,代码来源:SubTrackingVisibleComponent.java


示例5: createObservable

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
@Override
public IObservable createObservable ( final Object target )
{
    if ( target instanceof IObservableSet )
    {
        return (IObservable)target;
    }
    else if ( target instanceof TreeNode )
    {
        return ( (TreeNode)target ).createObservable ();
    }
    else
    {
        return null;
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:17,代码来源:FactoryImpl.java


示例6: execute

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
@Override
public Object execute ( final ExecutionEvent event ) throws ExecutionException
{
    final Component component = SelectionHelper.first ( getSelection (), Component.class );
    if ( component == null )
    {
        return null;
    }

    try
    {
        final IObservableSet input = Helper.createObversableInput ( DisplayRealm.getRealm ( getShell ().getDisplay () ), component );
        new ComponentOutputDialog ( getShell (), input ).open ();
    }
    catch ( final Exception e )
    {
        StatusManager.getManager ().handle ( StatusHelper.convertStatus ( Activator.PLUGIN_ID, "Failed to generate component output", e ), StatusManager.BLOCK );
        throw new ExecutionException ( "Failed to generate component output", e );
    }

    return null;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:23,代码来源:ShowComponentSpy.java


示例7: bindAlgoParamValues

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
private void bindAlgoParamValues() {
	DataBindingContext ctx = new DataBindingContext();
	IObservableSet modelSet = BeansObservables.observeSet(
			Realm.getDefault(), selectedAlgorithm, "algorithms");
	// ViewerSupport.bind(checkboxTableViewer, modelSet,
	// BeanProperties.value(Algorithm.class, "name"));

	IObservableSet widgetSet = ViewersObservables.observeCheckedElements(
			algorithmTableViewer, Algorithm.class);
	// modelSet = BeansObservables.obser(Realm.getDefault(),
	// selectedAlgorithm, "algorithms");

	ctx.bindSet(widgetSet, modelSet);

	// .observe(key);
	// ctx.bindSet(widgetSet, modelSet);
	// IObservableValue modelValue = BeanProperties.value(
	// AlgorithmParameter.class, btnBindding.get(key)).observe(
	// algoPara);

}
 
开发者ID:CrowdsourcingGeek,项目名称:CrowdBenchmark,代码行数:22,代码来源:SimulateConfigPart.java


示例8: ListeningStyledCellLabelProvider

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
public ListeningStyledCellLabelProvider ( final IObservableSet itemsThatNeedLabels )
{
    this.items = itemsThatNeedLabels;
    this.items.addSetChangeListener ( this.listener );
    for ( final Iterator<?> it = this.items.iterator (); it.hasNext (); )
    {
        addListenerTo ( it.next () );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:10,代码来源:ListeningStyledCellLabelProvider.java


示例9: addSource

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
protected void addSource ( final IObservableSet observableSet )
{
    if ( observableSet == null )
    {
        return;
    }

    this.sources.add ( observableSet );
    observableSet.addSetChangeListener ( this.listener );
    for ( final Iterator<?> it = observableSet.iterator (); it.hasNext (); )
    {
        addListenerTo ( it.next () );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:15,代码来源:ListeningLabelProvider.java


示例10: createObservable

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
@Override
public IObservable createObservable ( final Object target )
{
    if ( target == Activator.ROOT )
    {
        return Observables.proxyObservableSet ( Activator.getDefault ().getTreeRoot () );
    }
    else if ( target instanceof TreeNode )
    {
        return new UnionSet ( new IObservableSet[] { ( (TreeNode)target ).getChildren (), ( (TreeNode)target ).getConnections () } );
    }
    return null;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:14,代码来源:ConnectionTreeObservableFactory.java


示例11: createDiscovererSet

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
/**
 * Create a new set with all known discoverers
 * <p>
 * The method creates a new instance which must be disposed by the caller.
 * </p>
 *
 * @return a new set of {@link ConnectionDiscovererBean}s
 */
public IObservableSet createDiscovererSet ()
{
    synchronized ( this )
    {
        if ( this.discoverers == null )
        {
            createDiscoverers ();
        }
        return Observables.proxyObservableSet ( this.discoverers );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:20,代码来源:Activator.java


示例12: getStoresSet

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
/**
 * Get the list of known stores (ConnectionStore)
 * <p>
 * This instance must not be disposed. If you need an instance that can be
 * disposed you need to wrap the received instance using
 * {@link Observables#proxyObservableSet(IObservableSet)}
 * </p>
 *
 * @return a list of {@link ConnectionDiscovererBean}s which implement the
 *         {@link ConnectionStore} interface
 */
public IObservableSet getStoresSet ()
{
    synchronized ( this )
    {
        if ( this.stores == null )
        {
            createDiscoverers ();
        }
        return this.stores;
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:23,代码来源:Activator.java


示例13: getDescriptors

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
/**
 * Returns a list of descriptors used by this and all sub components
 *
 * @return the list of descriptors. It never returns <code>null</code>.
 */
@Override
public IObservableSet getDescriptors ()
{
    final List<IObservableSet> lists = new LinkedList<IObservableSet> ();

    lists.add ( this.descriptors );

    for ( final ComponentVisibility visibility : this.visibilites )
    {
        lists.add ( visibility.getDescriptors () );
    }

    return new UnionSet ( lists.toArray ( new IObservableSet[lists.size ()] ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:20,代码来源:DetailComponentImpl.java


示例14: ServerLabelProvider

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
public ServerLabelProvider ( final IObservableSet knownElements )
{
    super ( new IObservableMap[] { //
    BeanProperties.value ( "running" ).observeDetail ( knownElements ), //
    BeanProperties.value ( "error" ).observeDetail ( knownElements ) //
    } );
    this.errorImage = HivesPlugin.getDefault ().getImageRegistry ().get ( ImageConstants.IMG_ERROR );
    this.runningImage = HivesPlugin.getDefault ().getImageRegistry ().get ( ImageConstants.IMG_RUNNING );
    this.stoppedImage = HivesPlugin.getDefault ().getImageRegistry ().get ( ImageConstants.IMG_STOPPED );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:11,代码来源:ServerLabelProvider.java


示例15: createObservable

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
@Override
public IObservable createObservable ( final Object target )
{
    logger.debug ( "Getting observable for: {}", target );
    if ( target instanceof IObservableSet )
    {
        return Observables.proxyObservableSet ( (IObservableSet)target );
    }
    else if ( target instanceof Master )
    {
        return Observables.proxyObservableSet ( ( (Master)target ).getEntries () );
    }
    else if ( target instanceof ItemEntry )
    {
        final ItemEntry itemEntry = (ItemEntry)target;
        if ( itemEntry.getCustomizationRequest () != null && itemEntry.getCustomizationRequest ().getComponent () != null )
        {
            final WritableSet result = new WritableSet ();
            result.add ( new ClassInformationProvider ( itemEntry.getCustomizationRequest ().getComponent ().getClass () ) );
            return result;
        }
    }
    else if ( target instanceof ClassInformationProvider )
    {
        return ( (ClassInformationProvider)target ).createSuper ( null );
    }
    return null;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:29,代码来源:ComponentOutputObservableFactory.java


示例16: createSuper

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
public IObservableSet createSuper ( final Realm realm )
{
    final WritableSet result = new WritableSet ( realm != null ? realm : Realm.getDefault () );
    if ( this.classInformation != null )
    {
        add ( result, this.classInformation.getSuperclass () );
        for ( final Class<?> iface : this.classInformation.getInterfaces () )
        {
            add ( result, iface );
        }
    }
    return result;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:14,代码来源:ClassInformationProvider.java


示例17: initAccessControllChangeTrack

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
/**
 * Modell m�dos�t�s�ra t�rt�n� feliratkoz�s �s annak hat�s�ra jogosults�g ellen�rz�s inid�t�sa
 */
public void initAccessControllChangeTrack() {
	try {
		@SuppressWarnings("deprecation")
		AdvancedIncQueryEngine engine = AdvancedIncQueryEngine
				.createUnmanagedEngine(resource);
		Set<IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>>> specifications = QuerySpecificationRegistry
				.getContributedQuerySpecifications();
		ArrayList<IObservableSet> observableSetList = new ArrayList<IObservableSet>();

		for (IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>> s : specifications) {
			IObservableSet set = IncQueryObservables.observeMatchesAsSet(s
					.getMatcher(engine));
			observableSetList.add(set);
		}

		IObservableSet[] observabelArray = observableSetList
				.toArray(new IObservableSet[observableSetList.size()]);
		UnionSet union = new UnionSet(observabelArray);
		union.addSetChangeListener(new ISetChangeListener() {

			@Override
			public void handleSetChange(SetChangeEvent event) {
				// �llpotv�ltoz�k ellen�rz�se
				if (verifier.getLastExecutionStep() == null
						|| verifier.getLastExecutionStep() != getChangeState()) {
					// Jogosults�g ki�rt�kel�s elind�t�sa
					verifier.printExecutedResult(getChangeState());
				} else {
					// Az �llapotv�ltoz�k megegyeznek, ekkor nem kell semmit
					// se csin�lni
				}
			}
		});
	} catch (IncQueryException e) {
		e.printStackTrace();
	}

}
 
开发者ID:FTSRG,项目名称:mondo-collab-framework,代码行数:42,代码来源:AccessControlManager.java


示例18: createUniverseTable

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
private TableViewer createUniverseTable(Composite parent) {
	TableViewer tableViewer = new TableViewer(parent, SWT.NONE);
	Table table = tableViewer.getTable();
	table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	table.setHeaderVisible(true);
	table.setLinesVisible(true);

	TableViewerColumn nameCol = new TableViewerColumn(tableViewer, SWT.NONE);
	nameCol.getColumn().setWidth(200);
	nameCol.getColumn().setText(Messages.projectUniverseNamePropertyLabel);

	TableViewerColumn locationCol = new TableViewerColumn(tableViewer, SWT.NONE);
	locationCol.getColumn().setWidth(400);
	locationCol.getColumn().setText(Messages.projectUniverseFilePropertyLabel);

	tableViewer.setSorter(new ViewerSorter());

	IObservableSet input = BeansObservables.observeSet(universeDefinitionsModel, UniverseDefinitionsModel.PN_UNIVERSE_FILES);
	IValueProperty[] labelProperties = BeanProperties.values(new String[] { UniverseFile.PN_NAME, UniverseFile.PN_LOCATION });
	ViewerSupport.bind(tableViewer, input, labelProperties);

	return tableViewer;
}
 
开发者ID:inventage,项目名称:version-tiger,代码行数:24,代码来源:VersioningPreferencePage.java


示例19: bindProjectPreviewTable

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
private void bindProjectPreviewTable() {
	IObservableSet observableVersioningProjects = BeansObservables.observeSet(editVersionModel, EditVersionModel.PN_PROJECTS);
	IBeanValueProperty[] labelProperties = BeanProperties.values(new String[] { VersioningProject.PN_PROJECT_ID, VersioningProject.PN_OLD_VERSION, VersioningProject.PN_NEW_VERSION });
	
	ObservableSetContentProvider contentProvider = new ObservableSetContentProvider();
	projectPreviewTable.setContentProvider(contentProvider);
	projectPreviewTable.setLabelProvider(new TableLabelProvider(projectPreviewTable.getTable().getDisplay(), Properties.observeEach(contentProvider.getKnownElements(), labelProperties)));
	projectPreviewTable.setInput(observableVersioningProjects);
	
	projectPreviewTable.setCheckStateProvider(new ObservableCheckStateProvider<CheckboxTableViewer>(projectPreviewTable, observableVersioningProjects,
			BeanProperties.value(VersioningProject.PN_SELECTED)));
}
 
开发者ID:inventage,项目名称:version-tiger,代码行数:13,代码来源:EditVersionPage.java


示例20: ObservableCheckStateProvider

import org.eclipse.core.databinding.observable.set.IObservableSet; //导入依赖的package包/类
public ObservableCheckStateProvider(T checkableViewer, IObservableSet checkableElements, IValueProperty checkedAttribute, IValueProperty grayedAttribute) {
	this.checkableViewer = checkableViewer;
	this.checkedAttribute = checkedAttribute;
	this.checkedMap = checkedAttribute.observeDetail(checkableElements);
	this.grayedAttribute = grayedAttribute;
	checkStateListener = new CheckStateListener(checkedMap);
	refreshViewerListener = new RefreshViewerListener(checkableViewer);
	addCheckStateListener();
	addRefreshViewerListener();
}
 
开发者ID:inventage,项目名称:version-tiger,代码行数:11,代码来源:ObservableCheckStateProvider.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ComboList类代码示例发布时间:2022-05-23
下一篇:
Java MockValidationSpecification类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap