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