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


Java TreeViewer.update方法代码示例

本文整理汇总了Java中org.eclipse.jface.viewers.TreeViewer.update方法的典型用法代码示例。如果您正苦于以下问题:Java TreeViewer.update方法的具体用法?Java TreeViewer.update怎么用?Java TreeViewer.update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.viewers.TreeViewer的用法示例。


在下文中一共展示了TreeViewer.update方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: hasBeenModified

import org.eclipse.jface.viewers.TreeViewer; //导入方法依赖的package包/类
protected synchronized void hasBeenModified() {
	if (isInherited()) return;
	
	XMLVector<XMLVector<Object>> xmlv = new XMLVector<XMLVector<Object>>();
	for(PropertyTableRowTreeObject rowTreeObject : getChildren()){
		XMLVector<Object> row = new XMLVector<Object>(rowTreeObject.getObject());
		xmlv.add(row);
	}
	data = xmlv;
	
	try {
		DatabaseObject databaseObject = databaseObjectTreeObject.getObject();
		java.beans.PropertyDescriptor databaseObjectPropertyDescriptor = databaseObjectTreeObject.getPropertyDescriptor(getObject());
        Method setter = databaseObjectPropertyDescriptor.getWriteMethod();
        Object args[] = { data };
        setter.invoke(databaseObject, args);
        databaseObject.hasChanged = true;
        databaseObjectTreeObject.hasBeenModified(true);
	}
	catch (Exception e) {}
	
       TreeViewer viewer = (TreeViewer) getAdapter(TreeViewer.class);
   	viewer.update(databaseObjectTreeObject, null);
	
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:26,代码来源:PropertyTableTreeObject.java

示例2: rename

import org.eclipse.jface.viewers.TreeViewer; //导入方法依赖的package包/类
@Override
public boolean rename(String newName, Boolean bDialog) {
	if (getName().equals(newName))
		return true;
	
	IDesignTreeObject dto = getParentDesignTreeObject();
	if (((DesignDocumentTreeObject)dto).hasUpdate(newName)) {
		ConvertigoPlugin.logException(new ConvertigoException("The function named \"" + newName + "\" already exists."), "Unable to change the object name.", bDialog);
		return false;
	}
	
	getObject().setName(newName);
	hasBeenModified();
	
       TreeViewer viewer = (TreeViewer) getAdapter(TreeViewer.class);
   	viewer.update(this, null);
	
	return true;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:20,代码来源:DesignDocumentUpdateTreeObject.java

示例3: rename

import org.eclipse.jface.viewers.TreeViewer; //导入方法依赖的package包/类
public boolean rename(String newName, Boolean bDialog) {
	if (getName().equals(newName))
		return true;
	if (getParentDesignTreeObject().hasView(newName)) {
		ConvertigoPlugin.logException(new ConvertigoException("The view named \"" + newName + "\" already exists."), "Unable to change the object name.", bDialog);
		return false;
	}
	
	getObject().setName(newName);
	hasBeenModified();
	
       TreeViewer viewer = (TreeViewer) getAdapter(TreeViewer.class);
   	viewer.update(this, null);
	
	return true;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:17,代码来源:DesignDocumentViewTreeObject.java

示例4: rename

import org.eclipse.jface.viewers.TreeViewer; //导入方法依赖的package包/类
@Override
public boolean rename(String newName, Boolean bDialog) {
	if (getName().equals(newName))
		return true;
	
	IDesignTreeObject dto = getParentDesignTreeObject();
	if (((DesignDocumentTreeObject)dto).hasFilter(newName)) {
		ConvertigoPlugin.logException(new ConvertigoException("The function named \"" + newName + "\" already exists."), "Unable to change the object name.", bDialog);
		return false;
	}
	
	getObject().setName(newName);
	hasBeenModified();
	
       TreeViewer viewer = (TreeViewer) getAdapter(TreeViewer.class);
   	viewer.update(this, null);
	
	return true;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:20,代码来源:DesignDocumentFilterTreeObject.java

示例5: setPropertyValue

import org.eclipse.jface.viewers.TreeViewer; //导入方法依赖的package包/类
@Override
public void setPropertyValue(Object id, Object value) {
	DatabaseObject dbo = getObject();
       if (dbo instanceof UIDynamicElement) {
       	IonBean ionBean = ((UIDynamicElement)dbo).getIonBean();
       	if (ionBean != null) {
        	if (ionBean.hasProperty((String)id)) {
        		Object oldValue = ionBean.getPropertyValue((String)id);
        		if (value != null && !value.equals(oldValue)) {
        			if (value instanceof String) {
        				value = new MobileSmartSourceType((String) value);
        			}
	        		ionBean.setPropertyValue((String)id, value);
	        		
	        		TreeViewer viewer = (TreeViewer) getAdapter(TreeViewer.class);
	        		hasBeenModified(true);
	        		viewer.update(this, null);
	        		
	    	        TreeObjectEvent treeObjectEvent = new TreeObjectEvent(this, (String)id, oldValue, value);
	    	        ConvertigoPlugin.projectManager.getProjectExplorerView().fireTreeObjectPropertyChanged(treeObjectEvent);
	        		return;
        		}
        	}
       	}
       }
	super.setPropertyValue(id, value);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:28,代码来源:MobileUIComponentTreeObject.java

示例6: setPropertyValue

import org.eclipse.jface.viewers.TreeViewer; //导入方法依赖的package包/类
public void setPropertyValue(Object id, Object value) {
	
	hasBeenModified();
	
       TreeViewer viewer = (TreeViewer) getAdapter(TreeViewer.class);
   	viewer.update(this, null);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:8,代码来源:PropertyTableRowTreeObject.java


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