-
Notifications
You must be signed in to change notification settings - Fork 5
/
AppHtml5.java
141 lines (119 loc) · 6.39 KB
/
AppHtml5.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
package org.genericsystem.example.reactor;
import org.genericsystem.carcolor.model.Car;
import org.genericsystem.carcolor.model.CarColor;
import org.genericsystem.carcolor.model.CarColor2;
import org.genericsystem.carcolor.model.Color;
import org.genericsystem.carcolor.model.Power;
import org.genericsystem.carcolor.model.UsedCar;
import org.genericsystem.example.reactor.AppHtml.ExampleReactorScript;
import org.genericsystem.example.reactor.AppHtml5.GSInstancesComposite;
import org.genericsystem.example.reactor.AppHtml5.GSRowInstancesComposite;
import org.genericsystem.example.reactor.AppHtml5.GSTypeAttributes;
import org.genericsystem.example.reactor.AppHtml5.GSTypeAttributesRow;
import org.genericsystem.example.reactor.AppHtml5.GSTypeLabeledInstancesComposite;
import org.genericsystem.example.reactor.AppHtml5.GSTypeLabeledInstancesComposite.GSHeaderComponent_;
import org.genericsystem.example.reactor.AppHtml5.GSTypeLabeledInstancesComposite.GSHeaderComponent_.GSTypeAttributesRow_;
import org.genericsystem.example.reactor.AppHtml5.GSTypeLabeledInstancesComposite.GSInstanceContentComponent_;
import org.genericsystem.example.reactor.AppHtml5.GSTypeLabeledInstancesComposite.GSInstanceContentComponent_.GSInstanceAttributesRow_;
import org.genericsystem.example.reactor.AppHtml5.GSTypeTableInstancesComposite;
import org.genericsystem.example.reactor.AppHtml5.GSTypeTableInstancesComposite.GSInstanceContentComponent__;
import org.genericsystem.example.reactor.AppHtml5.GSTypeTableInstancesComposite.GSInstanceContentComponent__.GSInstanceAttributesRow__;
import org.genericsystem.example.reactor.AppHtml5.GSTypeTableInstancesComposite.GSInstanceContentComponent__.GSInstanceAttributesRow__.GSHoldersContentComponent;
import org.genericsystem.example.reactor.AppHtml5.GSTypeTableInstancesComposite.GSInstanceContentComponent__.GSInstanceAttributesRow__.GSHoldersContentComponent.GSHolders_;
import org.genericsystem.reactor.annotations.DependsOnModel;
import org.genericsystem.reactor.annotations.DirectSelect;
import org.genericsystem.reactor.annotations.ForEach.ChildForEach;
import org.genericsystem.reactor.annotations.ReactorDependencies;
import org.genericsystem.reactor.annotations.RunScript;
import org.genericsystem.reactor.annotations.Style;
import org.genericsystem.reactor.annotations.Style.AlignItems;
import org.genericsystem.reactor.annotations.Style.BackgroundColor;
import org.genericsystem.reactor.annotations.Style.ChildFlexDirection;
import org.genericsystem.reactor.annotations.Style.Flex;
import org.genericsystem.reactor.annotations.Style.FlexDirection;
import org.genericsystem.reactor.annotations.Style.FlexWrap;
import org.genericsystem.reactor.appserver.ApplicationServer;
import org.genericsystem.reactor.gs.GSApp;
import org.genericsystem.reactor.gs3.GSComposite;
import org.genericsystem.reactor.gs3.GSComposite.GSContentComponent;
import org.genericsystem.reactor.gs3.GSComposite.GSHeaderComponent;
import org.genericsystem.reactor.model.ObservableListExtractor;
import org.genericsystem.reactor.modelproperties.SelectionDefaults;
@DependsOnModel({ Car.class, Power.class, UsedCar.class, Color.class, CarColor.class, CarColor2.class })
@RunScript(ExampleReactorScript.class)
@ReactorDependencies({ GSInstancesComposite.class, GSRowInstancesComposite.class, GSTypeAttributes.class, GSTypeAttributesRow.class, GSTypeLabeledInstancesComposite.class, GSTypeTableInstancesComposite.class })
@FlexWrap("wrap")
@FlexDirection("row")
@Flex("1 1 0%")
public class AppHtml5 extends GSApp implements SelectionDefaults {
public static void main(String[] mainArgs) {
ApplicationServer.startSimpleGenericApp(mainArgs, AppHtml5.class, "/example-reactor");
}
@BackgroundColor("Green")
@DirectSelect(Car.class)
@ChildForEach(ObservableListExtractor.SUBINSTANCES.class)
public static class GSInstancesComposite extends GSComposite {
}
@BackgroundColor("Blue")
@FlexDirection("row")
@DirectSelect(Car.class)
@ChildForEach(ObservableListExtractor.SUBINSTANCES.class)
public static class GSRowInstancesComposite extends GSComposite {
}
@BackgroundColor("Red")
@DirectSelect(Car.class)
@ChildForEach(ObservableListExtractor.ATTRIBUTES_OF_TYPE.class)
@ReactorDependencies({ GSHeaderComponent.class, GSContentComponent.class })
public static class GSTypeAttributes extends GSComposite {
}
@BackgroundColor("Purple")
@Style.Color("White")
@DirectSelect(Car.class)
@FlexDirection("row")
@ChildForEach(ObservableListExtractor.ATTRIBUTES_OF_TYPE.class)
@ChildFlexDirection("row")
@ReactorDependencies({ GSHeaderComponent.class, GSContentComponent.class })
public static class GSTypeAttributesRow extends GSComposite {
}
@BackgroundColor("Orange")
@FlexDirection("row")
@ChildFlexDirection("row")
@ChildForEach(ObservableListExtractor.ATTRIBUTES_OF_INSTANCES.class)
@ReactorDependencies({ GSHeaderComponent.class, GSContentComponent.class })
public static class GSInstanceAttributesRow extends GSComposite {
}
@BackgroundColor("Brown")
@ChildForEach(ObservableListExtractor.HOLDERS.class)
@ReactorDependencies({ GSContentComponent.class })
public static class GSHolders extends GSComposite {
}
@DirectSelect(Car.class)
@ReactorDependencies({ GSHeaderComponent_.class, GSInstanceContentComponent_.class })
public static class GSTypeLabeledInstancesComposite extends GSInstancesComposite {
@ReactorDependencies({ GSTypeAttributesRow_.class })
public static class GSHeaderComponent_ extends GSHeaderComponent {
public static class GSTypeAttributesRow_ extends GSTypeAttributesRow {
}
}
@ReactorDependencies({ GSInstanceAttributesRow_.class })
public static class GSInstanceContentComponent_ extends GSContentComponent {
public static class GSInstanceAttributesRow_ extends GSInstanceAttributesRow {
}
}
}
@DirectSelect(Car.class)
@ReactorDependencies({ GSHeaderComponent_.class, GSInstanceContentComponent__.class })
public static class GSTypeTableInstancesComposite extends GSTypeLabeledInstancesComposite {
@ReactorDependencies({ GSInstanceAttributesRow__.class })
public static class GSInstanceContentComponent__ extends GSInstanceContentComponent_ {
@ReactorDependencies({ GSHeaderComponent.class, GSHoldersContentComponent.class })
public static class GSInstanceAttributesRow__ extends GSInstanceAttributesRow_ {
@ReactorDependencies({ GSHolders_.class })
public static class GSHoldersContentComponent extends GSContentComponent {
public static class GSHolders_ extends GSHolders {
}
}
}
}
}
}