1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.myfaces.tobago.example.demo;
21
22 import javax.enterprise.context.SessionScoped;
23 import javax.inject.Named;
24 import javax.swing.tree.DefaultMutableTreeNode;
25 import java.io.Serializable;
26
27 @SessionScoped
28 @Named
29 public class TreeController implements Serializable {
30
31 private DefaultMutableTreeNode sample;
32 private boolean treeShowRoot = false;
33 private boolean treeShowRootJunction = false;
34 private boolean treeIndentRendered = true;
35 private boolean treeIndentShowJunction = true;
36
37 public TreeController() {
38 sample = CategoryTree.createSample();
39 }
40
41 public DefaultMutableTreeNode getSample() {
42 return sample;
43 }
44
45 public boolean isTreeShowRoot() {
46 return treeShowRoot;
47 }
48
49 public void setTreeShowRoot(final boolean treeShowRoot) {
50 this.treeShowRoot = treeShowRoot;
51 }
52
53 public boolean isTreeShowRootJunction() {
54 return treeShowRootJunction;
55 }
56
57 public void setTreeShowRootJunction(final boolean treeShowRootJunction) {
58 this.treeShowRootJunction = treeShowRootJunction;
59 }
60
61 public boolean isTreeIndentRendered() {
62 return treeIndentRendered;
63 }
64
65 public void setTreeIndentRendered(final boolean treeIndentRendered) {
66 this.treeIndentRendered = treeIndentRendered;
67 }
68
69 public boolean isTreeIndentShowJunction() {
70 return treeIndentShowJunction;
71 }
72
73 public void setTreeIndentShowJunction(final boolean treeIndentShowJunction) {
74 this.treeIndentShowJunction = treeIndentShowJunction;
75 }
76 }