當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。