List of usage examples for javax.swing.tree DefaultTreeModel DefaultTreeModel
@ConstructorProperties({ "root" }) public DefaultTreeModel(TreeNode root)
From source file:wilos.presentation.web.tree.TreeBean.java
private void buildTreeModel() { if (this.projectId != null && !this.projectId.equals(DEFAULT_PROJECT_ID)) { ProjectNode projectNode;/*w w w .j ava 2s .c o m*/ if (this.selectedMode.equals(TASKS_MODE)) { projectNode = new ProjectNode(this.project, true, treeMap); this.webSessionService.setAttribute(WebSessionService.TREE_MODE, TASKS_MODE); } else { projectNode = new ProjectNode(this.project, false, treeMap); this.webSessionService.setAttribute(WebSessionService.TREE_MODE, ROLES_MODE); } this.model = new DefaultTreeModel(projectNode); } else { // Build the default tree. this.model = new DefaultTreeModel(this.getDefaultTree()); } }