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


Java TreeItem.setHTML方法代码示例

本文整理汇总了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"));
		}
	}
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:24,代码来源:FolderSelectTree.java

示例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 ) );
        }
    }
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:19,代码来源:FactTypeBrowserWidget.java

示例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"));
	}
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:15,代码来源:FolderSelectTree.java

示例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"));
	}
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:16,代码来源:FolderSelectTree.java

示例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"));
		}
	}
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:35,代码来源:FolderTree.java

示例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 );
        }
    }
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:15,代码来源:DSLSentenceBrowserWidget.java


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