summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java
blob: d94d5d8608f34edad27798619fb7590033036ec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* 
@VaadinApache2LicenseForJavaFiles@
 */
package com.vaadin.shared.ui.splitpanel;

import java.io.Serializable;

import com.vaadin.shared.ComponentState;
import com.vaadin.shared.Connector;

public class AbstractSplitPanelState extends ComponentState {

    private Connector firstChild = null;
    private Connector secondChild = null;
    private SplitterState splitterState = new SplitterState();

    public boolean hasFirstChild() {
        return firstChild != null;
    }

    public boolean hasSecondChild() {
        return secondChild != null;
    }

    public Connector getFirstChild() {
        return firstChild;
    }

    public void setFirstChild(Connector firstChild) {
        this.firstChild = firstChild;
    }

    public Connector getSecondChild() {
        return secondChild;
    }

    public void setSecondChild(Connector secondChild) {
        this.secondChild = secondChild;
    }

    public SplitterState getSplitterState() {
        return splitterState;
    }

    public void setSplitterState(SplitterState splitterState) {
        this.splitterState = splitterState;
    }

    public static class SplitterState implements Serializable {
        private float position;
        private String positionUnit;
        private float minPosition;
        private String minPositionUnit;
        private float maxPosition;
        private String maxPositionUnit;
        private boolean positionReversed = false;
        private boolean locked = false;

        public float getPosition() {
            return position;
        }

        public void setPosition(float position) {
            this.position = position;
        }

        public String getPositionUnit() {
            return positionUnit;
        }

        public void setPositionUnit(String positionUnit) {
            this.positionUnit = positionUnit;
        }

        public float getMinPosition() {
            return minPosition;
        }

        public void setMinPosition(float minPosition) {
            this.minPosition = minPosition;
        }

        public String getMinPositionUnit() {
            return minPositionUnit;
        }

        public void setMinPositionUnit(String minPositionUnit) {
            this.minPositionUnit = minPositionUnit;
        }

        public float getMaxPosition() {
            return maxPosition;
        }

        public void setMaxPosition(float maxPosition) {
            this.maxPosition = maxPosition;
        }

        public String getMaxPositionUnit() {
            return maxPositionUnit;
        }

        public void setMaxPositionUnit(String maxPositionUnit) {
            this.maxPositionUnit = maxPositionUnit;
        }

        public boolean isPositionReversed() {
            return positionReversed;
        }

        public void setPositionReversed(boolean positionReversed) {
            this.positionReversed = positionReversed;
        }

        public boolean isLocked() {
            return locked;
        }

        public void setLocked(boolean locked) {
            this.locked = locked;
        }

    }
}