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


Java CheckboxTreeNode类代码示例

本文整理汇总了Java中org.primefaces.model.CheckboxTreeNode的典型用法代码示例。如果您正苦于以下问题:Java CheckboxTreeNode类的具体用法?Java CheckboxTreeNode怎么用?Java CheckboxTreeNode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: createCheckboxDocuments

import org.primefaces.model.CheckboxTreeNode; //导入依赖的package包/类
public TreeNode createCheckboxDocuments() {
/* 62 */     TreeNode root = new CheckboxTreeNode(new Document("Files", "-", "Folder"), null);
/*    */ 
/* 64 */     TreeNode documents = new CheckboxTreeNode(new Document("Documents", "-", "Folder"), root);
/* 65 */     TreeNode pictures = new CheckboxTreeNode(new Document("Pictures", "-", "Folder"), root);
/* 66 */     TreeNode movies = new CheckboxTreeNode(new Document("Movies", "-", "Folder"), root);
/*    */ 
/* 68 */     TreeNode work = new CheckboxTreeNode(new Document("Work", "-", "Folder"), documents);
/* 69 */     TreeNode primefaces = new CheckboxTreeNode(new Document("PrimeFaces", "-", "Folder"), documents);
/*    */ 
/* 72 */     TreeNode expenses = new CheckboxTreeNode("document", new Document("Expenses.doc", "30 KB", "Word Document"), work);
/* 73 */     TreeNode resume = new CheckboxTreeNode("document", new Document("Resume.doc", "10 KB", "Word Document"), work);
/* 74 */     TreeNode refdoc = new CheckboxTreeNode("document", new Document("RefDoc.pages", "40 KB", "Pages Document"), primefaces);
/*    */ 
/* 77 */     TreeNode barca = new CheckboxTreeNode("picture", new Document("barcelona.jpg", "30 KB", "JPEG Image"), pictures);
/* 78 */     TreeNode primelogo = new CheckboxTreeNode("picture", new Document("logo.jpg", "45 KB", "JPEG Image"), pictures);
/* 79 */     TreeNode optimus = new CheckboxTreeNode("picture", new Document("optimusprime.png", "96 KB", "PNG Image"), pictures);
/*    */ 
/* 82 */     TreeNode pacino = new CheckboxTreeNode(new Document("Al Pacino", "-", "Folder"), movies);
/* 83 */     TreeNode deniro = new CheckboxTreeNode(new Document("Robert De Niro", "-", "Folder"), movies);
/*    */ 
/* 85 */     TreeNode scarface = new CheckboxTreeNode("mp3", new Document("Scarface", "15 GB", "Movie File"), pacino);
/* 86 */     TreeNode carlitosWay = new CheckboxTreeNode("mp3", new Document("Carlitos' Way", "24 GB", "Movie File"), pacino);
/*    */ 
/* 88 */     TreeNode goodfellas = new CheckboxTreeNode("mp3", new Document("Goodfellas", "23 GB", "Movie File"), deniro);
/* 89 */     TreeNode untouchables = new CheckboxTreeNode("mp3", new Document("Untouchables", "17 GB", "Movie File"), deniro);
/*    */ 
/* 91 */     return root;
/*    */   }
 
开发者ID:marlonalexis,项目名称:Multicentro_Mascotas,代码行数:30,代码来源:DocumentService.java

示例2: init

import org.primefaces.model.CheckboxTreeNode; //导入依赖的package包/类
@PostConstruct
    public void init() {
//    	List<Category> categories = Test.getTrips();
    	List<Category> categories = placeServiceImpl.getPlacesCategories();
    	
        root = new CheckboxTreeNode(new Place("root", "root"), null);
        
        for (Category trip : categories) {
        	TreeNode first = new CheckboxTreeNode(new Place(trip.getName(), "-"), root);
        	for (Place place : trip.getPlaces()) {
        		TreeNode second = new CheckboxTreeNode(place, first);
			}
		}
    }
 
开发者ID:riaval,项目名称:runatrip,代码行数:15,代码来源:MainBean.java


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