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