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.model;
21
22 import java.io.Serializable;
23
24 public class TreeState implements Serializable, ScrollPositionState {
25
26 private ExpandedState expandedState;
27 private SelectedState selectedState;
28 private ScrollPosition scrollPosition;
29
30 public TreeState() {
31 this(new ExpandedState(2), new SelectedState(), new ScrollPosition());
32 }
33
34 public TreeState(final ExpandedState expandedState, final SelectedState selectedState) {
35 this(expandedState, selectedState, new ScrollPosition());
36 }
37
38 public TreeState(
39 final ExpandedState expandedState, final SelectedState selectedState, final ScrollPosition scrollPosition) {
40 this.expandedState = expandedState;
41 this.selectedState = selectedState;
42 this.scrollPosition = scrollPosition;
43 }
44
45 public ExpandedState getExpandedState() {
46 return expandedState;
47 }
48
49 public SelectedState getSelectedState() {
50 return selectedState;
51 }
52
53 @Override
54 public ScrollPosition getScrollPosition() {
55 return scrollPosition;
56 }
57 }