本文整理匯總了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);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}