本文整理汇总了Java中com.google.gwt.user.client.ui.TreeItem.setHTML方法的典型用法代码示例。如果您正苦于以下问题:Java TreeItem.setHTML方法的具体用法?Java TreeItem.setHTML怎么用?Java TreeItem.setHTML使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.TreeItem
的用法示例。
在下文中一共展示了TreeItem.setHTML方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: evaluesFolderIcon
import com.google.gwt.user.client.ui.TreeItem; //导入方法依赖的package包/类
/**
* Evalues actual folder icon to prevent other user interaction with the same folder
* this ensures icon and object hasChildsValue are consistent
*/
public void evaluesFolderIcon(TreeItem item) {
GWTFolder folderItem = (GWTFolder) item.getUserObject();
preventFolderInconsitences(item);
// Looks if must change icon on parent if now has no childs and properties with user security atention
if ((folderItem.getPermissions() & GWTPermission.WRITE) == GWTPermission.WRITE) {
if (folderItem.isHasChildren()) {
item.setHTML(Util.imageItemHTML("img/menuitem_childs.gif", folderItem.getName(), "top"));
} else {
item.setHTML(Util.imageItemHTML("img/menuitem_empty.gif", folderItem.getName(), "top"));
}
} else {
if (folderItem.isHasChildren()) {
item.setHTML(Util.imageItemHTML("img/menuitem_childs_ro.gif", folderItem.getName(), "top"));
} else {
item.setHTML(Util.imageItemHTML("img/menuitem_empty_ro.gif", folderItem.getName(), "top"));
}
}
}
示例2: setFullyQualifiedClassNames
import com.google.gwt.user.client.ui.TreeItem; //导入方法依赖的package包/类
public void setFullyQualifiedClassNames( final List<String> fullyQualifiedClassNames ) {
if ( tree.getItem( 0 ) != null ) {
tree.clear();
}
if ( fullyQualifiedClassNames != null ) {
for ( String type : fullyQualifiedClassNames ) {
final TreeItem it = new TreeItem();
it.setHTML( AbstractImagePrototype.create( DRLTextEditorResources.INSTANCE.images().classImage() ).getHTML()
+ "<small style=\"cursor: pointer\">"
+ type + "</small>" );
it.setUserObject( new ClassUserObject( type + "( )",
type ) );
tree.addItem( it );
it.addItem( Util.toSafeHtml( LAZY_LOAD ) );
}
}
}
示例3: evaluesFolderIcon
import com.google.gwt.user.client.ui.TreeItem; //导入方法依赖的package包/类
/**
* Evalues actual folder icon to prevent other user interaction with the same folder
* this ensures icon and object hasChildsValue are consistent
*/
public void evaluesFolderIcon(TreeItem item) {
GWTFolder folderItem = (GWTFolder) item.getUserObject();
preventFolderInconsitences(item);
if (folderItem.isHasChildren()) {
item.setHTML(Util.imageItemHTML("img/menuitem_childs.gif", folderItem.getName(), "top"));
} else {
item.setHTML(Util.imageItemHTML("img/menuitem_empty.gif", folderItem.getName(), "top"));
}
}
示例4: evaluesFolderIcon
import com.google.gwt.user.client.ui.TreeItem; //导入方法依赖的package包/类
/**
* Evalues actual folder icon to prevent other user interaction with the same folder
* this ensures icon and object hasChildsValue are consistent
*/
public void evaluesFolderIcon(TreeItem item) {
GWTFolder folderItem = (GWTFolder) item.getUserObject();
preventFolderInconsitences(item);
// Looks if must change icon on parent if now has no childs and properties with user security atention
if (folderItem.isHasChildren()) {
item.setHTML(Util.imageItemHTML("img/menuitem_childs.gif", folderItem.getName(), "top"));
} else {
item.setHTML(Util.imageItemHTML("img/menuitem_empty.gif", folderItem.getName(), "top"));
}
}
示例5: evaluesFolderIcon
import com.google.gwt.user.client.ui.TreeItem; //导入方法依赖的package包/类
/**
* Evalues actual folder icon to prevent other user interaction with the
* same folder this ensures icon and object hasChildsValue are consistent
*/
public void evaluesFolderIcon(TreeItem item) {
GWTFolder folderItem = (GWTFolder) item.getUserObject();
preventFolderInconsitences(item);
// On case folder is subscribed mus change icon
String subscribed = "";
if (folderItem.isSubscribed()) {
subscribed = "_subscribed";
}
// Looks if must change icon on parent if now has no childs and
// properties with user security atention
if ((folderItem.getPermissions() & GWTPermission.WRITE) == GWTPermission.WRITE) {
if (folderItem.isHasChildren()) {
item.setHTML(Util.imageItemHTML("img/menuitem_childs" + subscribed + ".gif", folderItem
.getName(), "top"));
} else {
item.setHTML(Util.imageItemHTML("img/menuitem_empty" + subscribed + ".gif", folderItem
.getName(), "top"));
}
} else {
if (folderItem.isHasChildren()) {
item.setHTML(Util.imageItemHTML("img/menuitem_childs_ro" + subscribed + ".gif", folderItem
.getName(), "top"));
} else {
item.setHTML(Util.imageItemHTML("img/menuitem_empty_ro" + subscribed + ".gif", folderItem
.getName(), "top"));
}
}
}
示例6: setDSLSentences
import com.google.gwt.user.client.ui.TreeItem; //导入方法依赖的package包/类
public void setDSLSentences( final List<DSLSentence> dslSentences ) {
if ( tree.getItem( 0 ) != null ) {
tree.clear();
}
if ( dslSentences != null ) {
for ( DSLSentence dslSentence : dslSentences ) {
final TreeItem it = new TreeItem();
it.setHTML( "<small>" + dslSentence.toString() + "</small>" );
it.setUserObject( dslSentence );
tree.addItem( it );
}
}
}