1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.rice.kew.web; |
18 | |
|
19 | |
import java.util.ArrayList; |
20 | |
import java.util.List; |
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
public class ShowHideTree implements java.io.Serializable { |
28 | |
|
29 | |
private static final long serialVersionUID = 6048341469002946402L; |
30 | |
|
31 | 0 | private Boolean show = Boolean.TRUE; |
32 | 0 | private List children = new ArrayList(); |
33 | |
|
34 | 0 | public ShowHideTree() { |
35 | 0 | } |
36 | |
|
37 | |
public List getChildren() { |
38 | 0 | return children; |
39 | |
} |
40 | |
|
41 | |
public void setChildren(List children) { |
42 | 0 | this.children = children; |
43 | 0 | } |
44 | |
|
45 | |
public ShowHideTree getChild(Integer value) { |
46 | 0 | return getChild(value.intValue()); |
47 | |
} |
48 | |
|
49 | |
public ShowHideTree getChild(int value) { |
50 | 0 | for (int index = children.size(); index <= value; index++) { |
51 | 0 | children.add(new ShowHideTree()); |
52 | |
} |
53 | 0 | return (ShowHideTree)children.get(value); |
54 | |
} |
55 | |
|
56 | |
public ShowHideTree append() { |
57 | 0 | return getChild(children.size()); |
58 | |
} |
59 | |
|
60 | |
public ShowHideTree remove(Integer index) { |
61 | 0 | return remove(index.intValue()); |
62 | |
} |
63 | |
|
64 | |
public ShowHideTree remove(int index) { |
65 | 0 | return (ShowHideTree)children.remove(index); |
66 | |
} |
67 | |
|
68 | |
public Boolean getShow() { |
69 | 0 | return show; |
70 | |
} |
71 | |
|
72 | |
public void setShow(Boolean show) { |
73 | 0 | this.show = show; |
74 | 0 | } |
75 | |
|
76 | |
} |