-
Notifications
You must be signed in to change notification settings - Fork 5
/
GSCellDiv.java
110 lines (97 loc) · 3.05 KB
/
GSCellDiv.java
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
package org.genericsystem.reactor.az3;
import org.genericsystem.reactor.annotations.Styles.AlignItems;
import org.genericsystem.reactor.annotations.Styles.BackgroundColor;
import org.genericsystem.reactor.annotations.Styles.Color;
import org.genericsystem.reactor.annotations.Styles.Flex;
import org.genericsystem.reactor.annotations.Styles.FlexDirectionStyle;
import org.genericsystem.reactor.annotations.Styles.FlexWrap;
import org.genericsystem.reactor.annotations.Styles.GenericValueBackgroundColor;
import org.genericsystem.reactor.annotations.Styles.Height;
import org.genericsystem.reactor.annotations.Styles.JustifyContent;
import org.genericsystem.reactor.annotations.Styles.KeepFlexDirection;
import org.genericsystem.reactor.annotations.Styles.MarginBottom;
import org.genericsystem.reactor.annotations.Styles.MarginRight;
import org.genericsystem.reactor.annotations.Styles.Overflow;
import org.genericsystem.reactor.annotations.Styles.Style;
import org.genericsystem.reactor.az.FlexDirection;
import org.genericsystem.reactor.az.GSDiv;
import org.genericsystem.reactor.gstag.HtmlHyperLink;
@Flex("1")
@Overflow("hidden")
public class GSCellDiv extends GSDiv {
@BackgroundColor("#EA4500")
@MarginRight("1px")
@MarginBottom("1px")
@Color("White")
@JustifyContent("center")
@AlignItems("center")
public static class GSTitleDiv extends GSDiv {
}
@Flex("1")
@JustifyContent("center")
@AlignItems("center")
@MarginRight("1px")
@MarginBottom("1px")
@Color("#ffffff")
@BackgroundColor("#ea0084")
public static class GSTitleLineCellDiv extends GSDiv {
}
@KeepFlexDirection
@BackgroundColor("#ea0084")
@MarginRight("1px")
@MarginBottom("1px")
public static class ButtonDiv extends GSDiv {
@Override
public void init() {
if (FlexDirection.ROW.equals(getDirection())) {
addStyle("flex", "0");
addStyle("min-width", "100px");
} else {
addStyle("flex", "1");
}
getDirectionProperty().addListener((o, v, nv) -> {
if (FlexDirection.ROW.equals(nv)) {
addStyle("flex", "0");
addStyle("min-width", "100px");
} else {
addStyle("flex", "1");
}
});
}
}
@FlexDirectionStyle(FlexDirection.ROW)
@Flex("1")
@MarginRight("1px")
@MarginBottom("1px")
@Color("#ffffff")
public static class GSSubcellEditorDiv extends GSDiv {
}
@JustifyContent("center")
@AlignItems("center")
public static class GSComponentEditorDiv extends GSSubcellEditorDiv {
}
@Color("#000000")
@GenericValueBackgroundColor
public static class GSSubcellDiv extends GSComponentEditorDiv {
}
@Flex("1")
@FlexDirectionStyle(FlexDirection.COLUMN)
@FlexWrap("wrap")
@Overflow("auto")
public static class WrappedColumnDiv extends GSDiv {
}
@Flex("1 0 auto")
@FlexDirectionStyle(FlexDirection.ROW)
public static class SubcellEditorContainerDiv extends GSDiv {
}
@Flex("1")
@JustifyContent("center")
@AlignItems("center")
public static class CenteredFlexDiv extends GSDiv {
}
@JustifyContent("center")
@Height("100%")
@Style(propertyName = "text-decoration", propertyValue = "none")
public static class GSActionLink extends HtmlHyperLink {
}
}