-
Notifications
You must be signed in to change notification settings - Fork 5
/
AppHtml4.java
70 lines (58 loc) · 3.36 KB
/
AppHtml4.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
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.AppHtml4.GSLabeledInstancesComposite;
import org.genericsystem.example.reactor.AppHtml4.GSLabeledInstancesComposite.GSContentComponentLabel;
import org.genericsystem.example.reactor.AppHtml4.GSLabeledTitleInstancesComposite;
import org.genericsystem.example.reactor.AppHtml4.GSLabeledTitleInstancesComposite.GSFirstComponentLabel;
import org.genericsystem.example.reactor.AppHtml4.GSLabeledTitleInstancesComposite.GSRowContentComponent;
import org.genericsystem.reactor.annotations.DependsOnModel;
import org.genericsystem.reactor.annotations.DirectSelect;
import org.genericsystem.reactor.annotations.ForEach;
import org.genericsystem.reactor.annotations.Parent;
import org.genericsystem.reactor.annotations.ReactorDependencies;
import org.genericsystem.reactor.annotations.RunScript;
import org.genericsystem.reactor.annotations.Style;
import org.genericsystem.reactor.annotations.Styles;
import org.genericsystem.reactor.appserver.ApplicationServer;
import org.genericsystem.reactor.gs.GSApp;
import org.genericsystem.reactor.gs3.GSComposite.GSComponent.GSContentComponent;
import org.genericsystem.reactor.gs3.GSComposite.GSComponent.GSHeaderComponent;
import org.genericsystem.reactor.gs3.GSComposite.GSHeaderComposite;
import org.genericsystem.reactor.gstag.HtmlLabel.GSLabelDisplayer;
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({ GSLabeledInstancesComposite.class, GSLabeledTitleInstancesComposite.class })
public class AppHtml4 extends GSApp implements SelectionDefaults {
public static void main(String[] mainArgs) {
ApplicationServer.startSimpleGenericApp(mainArgs, AppHtml4.class, "/example-reactor");
}
@Styles({ @Style(propertyName = "background-color", propertyValue = "red") })
@DirectSelect(Car.class)
@ReactorDependencies({ GSContentComponentLabel.class })
public static class GSLabeledInstancesComposite extends GSHeaderComposite {
@ForEach(ObservableListExtractor.SUBINSTANCES.class)
@Parent(GSContentComponent.class)
public static class GSContentComponentLabel extends GSLabelDisplayer {
}
}
@Styles({ @Style(propertyName = "flex-flow", propertyValue = "row"), @Style(propertyName = "background-color", propertyValue = "green"), })
@DirectSelect(Car.class)
@ReactorDependencies({ GSFirstComponentLabel.class, GSRowContentComponent.class, GSContentComponentLabel.class })
public static class GSLabeledTitleInstancesComposite extends GSHeaderComposite {
@Style(propertyName = "flex-flow", propertyValue = "row wrap")
public static class GSRowContentComponent extends GSContentComponent {
}
@Parent(GSHeaderComponent.class)
@Styles({ @Style(propertyName = "background-color", propertyValue = "orange") })
public static class GSFirstComponentLabel extends GSLabelDisplayer {
}
}
}