-
Notifications
You must be signed in to change notification settings - Fork 5
/
Table.java
98 lines (83 loc) · 5.06 KB
/
Table.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
package org.genericsystem.reactor.az3;
import org.genericsystem.reactor.annotations.ForEach;
import org.genericsystem.reactor.annotations.ReactorDependencies;
import org.genericsystem.reactor.annotations.Select;
import org.genericsystem.reactor.annotations.Styles;
import org.genericsystem.reactor.annotations.Styles.AlignItems;
import org.genericsystem.reactor.annotations.Styles.BackgroundColor;
import org.genericsystem.reactor.annotations.Styles.Flex;
import org.genericsystem.reactor.annotations.Styles.FlexDirectionStyle;
import org.genericsystem.reactor.annotations.Styles.GenericValueBackgroundColor;
import org.genericsystem.reactor.annotations.Styles.JustifyContent;
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.ReverseFlexDirection;
import org.genericsystem.reactor.annotations.Styles.Style;
import org.genericsystem.reactor.az.FlexDirection;
import org.genericsystem.reactor.az.GSCheckBoxWithValue.GSCheckBoxDisplayer;
import org.genericsystem.reactor.az.GSDiv;
import org.genericsystem.reactor.az3.GSComposite.Content;
import org.genericsystem.reactor.az3.GSComposite.Header;
import org.genericsystem.reactor.az3.GSComposite.Header.HeaderLabel;
import org.genericsystem.reactor.az3.Table.ContentRow;
import org.genericsystem.reactor.model.ObservableListExtractor;
import org.genericsystem.reactor.model.ObservableValueSelector;
@Flex("1 1 0%")
@Overflow("hidden")
@ReactorDependencies(ContentRow.class)
public class Table extends GSDiv {
@ReverseFlexDirection
public static class HeaderRow extends GSComposite {
}
@ReverseFlexDirection
public static class ContentRow extends GSComposite {
}
@ReverseFlexDirection
public static class FooterRow extends GSComposite {
}
@Style(name = "margin", value = "4px")
@Styles.Color(path = HeaderRow.class, value = "white")
@BackgroundColor(path = { HeaderRow.class, GSValueComponents.class, Content.class }, value = "Purple")
@BackgroundColor(path = { HeaderRow.class, GSValueComponents.class, Header.class }, value = "Purple")
@BackgroundColor(path = { HeaderRow.class, Content.class, GSValueComponents.class, Content.class }, value = "Purple")
@BackgroundColor(path = { HeaderRow.class, Content.class, GSValueComponents.class, Header.class }, value = "Purple")
@AlignItems(path = { ContentRow.class, GSValueComponents.class, Header.class }, value = "flex-start")
@ReactorDependencies({ HeaderRow.class, ContentRow.class })
@ReactorDependencies(path = HeaderRow.class, value = { GSValueComponents.class, Content.class })
@ReactorDependencies(path = ContentRow.class, value = { GSValueComponents.class, GSHolders.class })
@ReactorDependencies(path = { HeaderRow.class, Content.class }, value = GSValueComponents.class)
@ForEach(path = { HeaderRow.class, Content.class }, value = ObservableListExtractor.ATTRIBUTES_OF_TYPE.class)
@ForEach(path = ContentRow.class, value = ObservableListExtractor.SUBINSTANCES.class)
@ForEach(path = { ContentRow.class, GSHolders.class }, value = ObservableListExtractor.ATTRIBUTES_OF_INSTANCES.class)
@ForEach(path = { ContentRow.class, GSValueComponents.class, Content.class }, value = ObservableListExtractor.OTHER_COMPONENTS_2.class)
public static class InstancesTable extends Table {
}
@BackgroundColor("Brown")
@GenericValueBackgroundColor(path = { GSValueComponents.class, Content.class }, value = "#e5ed00")
@ReactorDependencies(value = GSValueComponents.class)
@ReactorDependencies(path = { GSValueComponents.class, Header.class }, value = { HeaderLabel.class, GSCheckBoxDisplayer.class })
@ForEach(path = GSValueComponents.class, value = ObservableListExtractor.HOLDERS.class)
@ForEach(path = { GSValueComponents.class, Content.class }, value = ObservableListExtractor.OTHER_COMPONENTS_2.class)
@Select(path = { GSValueComponents.class, Header.class, HeaderLabel.class }, value = ObservableValueSelector.LABEL_DISPLAYER.class)
@Select(path = { GSValueComponents.class, Header.class, GSCheckBoxDisplayer.class }, value = ObservableValueSelector.CHECK_BOX_DISPLAYER.class)
public static class GSHolders extends GSComposite {
}
// @DirectSelect(Power.class)
@BackgroundColor(path = Content.class, value = "Yellow")
@BackgroundColor(path = Header.class, value = "Yellow")
@JustifyContent(path = Header.class, value = "center")
@AlignItems(path = Header.class, value = "center")
@JustifyContent(path = Content.class, value = "center")
@AlignItems(path = Content.class, value = "center")
@FlexDirectionStyle(FlexDirection.ROW)
@ForEach(path = Content.class, value = ObservableListExtractor.OTHER_COMPONENTS_1.class)
@Select(path = Header.class, value = ObservableValueSelector.STRICT_ATTRIBUTE_SELECTOR.class)
@ReactorDependencies({ Header.class, Content.class })
@MarginRight(path = Header.class, value = "1px")
@MarginBottom(path = Header.class, value = "1px")
@MarginRight(path = Content.class, value = "1px")
@MarginBottom(path = Content.class, value = "1px")
public static class GSValueComponents extends GSComposite {
}
}