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