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


Java IObservable类代码示例

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


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

示例1: createObservable

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

示例2: createObservable

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

    if ( target instanceof ConnectionHolder )
    {
        return new RootFolderObserver ( (ConnectionHolder)target );
    }
    else if ( target instanceof FolderEntryWrapper )
    {
        final FolderEntry entry = AdapterHelper.adapt ( target, FolderEntry.class );
        if ( entry != null )
        {
            // only return a new observer if the folder entry is of type FolderEntry
            return new SubFolderObserver ( (FolderEntryWrapper)target );
        }
        else
        {
            return null;
        }
    }

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

示例3: createObservable

import org.eclipse.core.databinding.observable.IObservable; //导入依赖的package包/类
@Override
public IObservable createObservable ( final Object target )
{
    if ( target instanceof ConnectionHolder )
    {
        return new ConnectionWrapper ( (ConnectionHolder)target );
    }
    else if ( target instanceof ItemListWrapper )
    {
        return new ItemListObserver ( ( (ItemListWrapper)target ).getConnection () );
    }
    else if ( target instanceof QueryWrapper )
    {
        return ( (QueryWrapper)target ).getQueriesObservable ();
    }

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

示例4: createObservable

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

示例5: statusChanged

import org.eclipse.core.databinding.observable.IObservable; //导入依赖的package包/类
/**
 * Status changed.
 *
 * @param status the status
 */
private void statusChanged(IStatus status)
{
	for (Iterator it = targets.iterator(); it.hasNext();)
	{
		IObservable observable = (IObservable) it.next();
		updater.updateBackground(findControl(observable), status);
	}
	for (Iterator it = targetDecorations.iterator(); it.hasNext();)
	{
		TargetDecoration targetDecoration = (TargetDecoration) it.next();
		ControlDecoration decoration = targetDecoration.decoration;
		updater.update(decoration, status);
		updater.updateBackground(findControl(targetDecoration.target), status);

	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:22,代码来源:BackgroundControlDecorationSupport.java

示例6: createObservable

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

示例7: dispose

import org.eclipse.core.databinding.observable.IObservable; //导入依赖的package包/类
public void dispose(){
	if(this.cells != null){
		for(TreeCell cell : this.cells){
			if(cell != null){
				cell.dispose();
			}
		}
	}
	
	if(this.currentChildren != null){
		for(TreeRow row: this.currentChildren){
			if(row != null){
				row.dispose();
			}
		}
	}

	this.currentChildren = null;
	
	for(IObservable o : externalObservables.values()){
		o.dispose();
	}
	externalObservables.clear();
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:25,代码来源:TreeRow.java

示例8: createObservable

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

示例9: processRemove

import org.eclipse.core.databinding.observable.IObservable; //导入依赖的package包/类
/**
* @since 1.2
*/
  protected void processRemove ( final Object element )
  {
      final IObservable obs = this.observables.remove ( element );
      if ( obs != null )
      {
          obs.dispose ();
      }
      else
      {
          removeListenerFrom ( element );
      }
  }
 
开发者ID:eclipse,项目名称:neoscada,代码行数:16,代码来源:ListeningStyledCellLabelProvider.java

示例10: dispose

import org.eclipse.core.databinding.observable.IObservable; //导入依赖的package包/类
@Override
public void dispose ()
{
    for ( final IObservable obs : this.observables.values () )
    {
        obs.dispose ();
    }
    this.observables.clear ();
    super.dispose ();
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:11,代码来源:ListeningStyledCellLabelProvider.java

示例11: createObservable

import org.eclipse.core.databinding.observable.IObservable; //导入依赖的package包/类
public IObservable createObservable ( final Object target )
{
    if ( target instanceof ConnectionHolder )
    {
        return new ConnectionWrapper ( (ConnectionHolder)target );
    }
    else if ( target instanceof FactoryInformationBean )
    {
        return Observables.proxyObservableSet ( ( (FactoryInformationBean)target ).getConfigurations () );
    }

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

示例12: createObservable

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

示例13: createObservable

import org.eclipse.core.databinding.observable.IObservable; //导入依赖的package包/类
@Override
public IObservable createObservable ( final Object target )
{
    if ( target == Activator.ROOT )
    {
        return Activator.getDefault ().createDiscovererSet ();
    }
    else if ( target instanceof ConnectionDiscovererBean )
    {
        final ConnectionDiscovererBean element = (ConnectionDiscovererBean)target;
        return element.getKnownConnections ();
    }
    return null;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:15,代码来源:ConnectionObservableFactory.java

示例14: createObservable

import org.eclipse.core.databinding.observable.IObservable; //导入依赖的package包/类
public IObservable createObservable ( final Object target )
{
    if ( target instanceof ConnectionHolder )
    {
        return new ConnectionWrapper ( (ConnectionHolder)target );
    }
    else if ( target instanceof QueryListWrapper )
    {
        return ( (QueryListWrapper)target ).getObservableQueries ();
    }

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

示例15: createObservable

import org.eclipse.core.databinding.observable.IObservable; //导入依赖的package包/类
public IObservable createObservable ( final Object target )
{
    if ( target instanceof ConnectionHolder )
    {
        return new ConnectionWrapper ( (ConnectionHolder)target );
    }

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


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