OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 94 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 94 Rev 180
Line 15... Line 15...
15
 
15
 
16
import net.jcip.annotations.Immutable;
16
import net.jcip.annotations.Immutable;
17
 
17
 
18
@Immutable
18
@Immutable
19
public class LayoutHints {
19
public class LayoutHints {
20
    private final boolean visible;
20
    private boolean visible;
21
    private final boolean largeWidth;
21
    private final boolean largeWidth;
22
    private final boolean largeHeight;
22
    private final boolean largeHeight;
23
    private boolean foldable = false;
23
    private boolean foldable = false;
24
 
24
 
25
    private final boolean showLabel;
25
    private final boolean showLabel;
Line 37... Line 37...
37
    public static final LayoutHints DEFAULT_VERY_LARGE_TEXT_HINTS = new LayoutHints(true, false, true, false, true, false, true);
37
    public static final LayoutHints DEFAULT_VERY_LARGE_TEXT_HINTS = new LayoutHints(true, false, true, false, true, false, true);
38
    public static final LayoutHints DEFAULT_LIST_HINTS = new LayoutHints(true, true, false, true, true, true);
38
    public static final LayoutHints DEFAULT_LIST_HINTS = new LayoutHints(true, true, false, true, true, true);
39
    public static final LayoutHints DEFAULT_GROUP_HINTS = new LayoutHints(true, false, false, false, true, true);
39
    public static final LayoutHints DEFAULT_GROUP_HINTS = new LayoutHints(true, false, false, false, true, true);
40
    public static final LayoutHints DEFAULT_SEPARATED_GROUP_HINTS = new LayoutHints(true, false, true, true, true, true);
40
    public static final LayoutHints DEFAULT_SEPARATED_GROUP_HINTS = new LayoutHints(true, false, true, true, true, true);
41
    public static final LayoutHints DEFAULT_NOLABEL_SEPARATED_GROUP_HINTS = new LayoutHints(true, false, false, true, true, true);
41
    public static final LayoutHints DEFAULT_NOLABEL_SEPARATED_GROUP_HINTS = new LayoutHints(true, false, false, true, true, true);
-
 
42
    public static final LayoutHints DEFAULT_SEPARATED_VERY_LARGE_HINTS = new LayoutHints(false, false, true, true, true, false, false, true);
42
 
43
 
43
    public LayoutHints(boolean largeWidth, boolean largeHeight, boolean showLabel) {
44
    public LayoutHints(boolean largeWidth, boolean largeHeight, boolean showLabel) {
44
        this(largeWidth, largeHeight, showLabel, false, false, false);
45
        this(largeWidth, largeHeight, showLabel, false, false, false);
45
    }
46
    }
46
 
47
 
Line 81... Line 82...
81
    }
82
    }
82
 
83
 
83
    public boolean isFoldable() {
84
    public boolean isFoldable() {
84
        return this.foldable;
85
        return this.foldable;
85
    }
86
    }
86
    
87
 
87
    public void setFoldable(final boolean foldable) {
88
    public void setFoldable(final boolean foldable) {
88
        this.foldable = foldable;
89
        this.foldable = foldable;
89
    }
90
    }
90
    
91
 
91
    public boolean largeWidth() {
92
    public boolean largeWidth() {
92
        return this.largeWidth;
93
        return this.largeWidth;
93
    }
94
    }
94
 
95
 
95
    public boolean largeHeight() {
96
    public boolean largeHeight() {
Line 155... Line 156...
155
        }
156
        }
156
        return r;
157
        return r;
157
    }
158
    }
158
 
159
 
159
    public boolean isVisible() {
160
    public boolean isVisible() {
160
        return visible;
161
        return this.visible;
-
 
162
    }
-
 
163
 
-
 
164
    public void setVisible(boolean b) {
-
 
165
        this.visible = b;
161
    }
166
    }
162
 
167
 
163
    @Override
168
    @Override
164
    public int hashCode() {
169
    public int hashCode() {
165
        final int prime = 31;
170
        final int prime = 31;
Line 185... Line 190...
185
            return false;
190
            return false;
186
        final LayoutHints other = (LayoutHints) obj;
191
        final LayoutHints other = (LayoutHints) obj;
187
        return this.fillHeight == other.fillHeight && this.fillWidth == other.fillWidth && this.largeHeight == other.largeHeight && this.largeWidth == other.largeWidth
192
        return this.fillHeight == other.fillHeight && this.fillWidth == other.fillWidth && this.largeHeight == other.largeHeight && this.largeWidth == other.largeWidth
188
                && this.separated == other.separated && this.showLabel == other.showLabel && this.split == other.split && this.visible == other.visible;
193
                && this.separated == other.separated && this.showLabel == other.showLabel && this.split == other.split && this.visible == other.visible;
189
    }
194
    }
-
 
195
 
190
}
196
}