Skip to content

Commit

Permalink
Merge branch 'master' of
Browse files Browse the repository at this point in the history
  • Loading branch information
Renaud Lancelot committed Sep 22, 2016
2 parents e30b81e + bf8e040 commit a07fde5
Show file tree
Hide file tree
Showing 8 changed files with 169 additions and 110 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public AppHtml3() {

new GSEditor(this).select__(this::getSelectionProperty);
new HorizontalGSEditor(this).select__(this::getSelectionProperty);

new GSTable(this).select(Color.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,13 @@
import org.genericsystem.reactor.annotations.ForEach;
import org.genericsystem.reactor.annotations.ReactorDependencies;
import org.genericsystem.reactor.annotations.RunScript;
import org.genericsystem.reactor.annotations.Style;
import org.genericsystem.reactor.annotations.Style.BackgroundColor;
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.annotations.Style.Overflow;
import org.genericsystem.reactor.appserver.ApplicationServer;
import org.genericsystem.reactor.gs.GSApp;
import org.genericsystem.reactor.gs3.CompositeTagImpl;
import org.genericsystem.reactor.gstag.HtmlLabel.GSLabelDisplayer;
import org.genericsystem.reactor.model.ObservableListExtractor;
import org.genericsystem.reactor.model.ObservableListExtractor.ATTRIBUTES_OF_INSTANCES;
Expand All @@ -57,26 +55,26 @@ public static void main(String[] mainArgs) {
ApplicationServer.startSimpleGenericApp(mainArgs, AppHtml4.class, "/example-reactor");
}

@Flex("1 1 0%")
@Overflow("hidden")
@ReactorDependencies({ GSContentComponent.class })
public static abstract class GSComposite extends CompositeTagImpl {
@Flex("1 1 0%")
@Overflow("hidden")
@ReactorDependencies({ GSContentComponentLabel.class })
public static class GSContentComponent extends CompositeTagImpl {
@org.genericsystem.reactor.annotations.Style.Flex("1 1 0%")
@org.genericsystem.reactor.annotations.Style.Overflow("hidden")
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSContentComponent.class })
public static abstract class GSComposite extends org.genericsystem.reactor.gs3.CompositeTagImpl {
@org.genericsystem.reactor.annotations.Style.Flex("1 1 0%")
@org.genericsystem.reactor.annotations.Style.Overflow("hidden")
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSContentComponentLabel.class })
public static class GSContentComponent extends org.genericsystem.reactor.gs3.CompositeTagImpl {
@Overflow("hidden")
public static class GSContentComponentLabel extends GSLabelDisplayer {

}
}
}

@BackgroundColor("Green")
@DirectSelect(Car.class)
@ReactorDependencies({ GSInstancesContentComponent.class })
@org.genericsystem.reactor.annotations.Style.BackgroundColor("Green")
@org.genericsystem.reactor.annotations.DirectSelect(Car.class)
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSInstancesContentComponent.class })
public static class GSInstancesComposite extends GSComposite {
@ForEach(ObservableListExtractor.SUBINSTANCES.class)
@org.genericsystem.reactor.annotations.ForEach(ObservableListExtractor.SUBINSTANCES.class)
public static class GSInstancesContentComponent extends GSContentComponent {

}
Expand All @@ -89,27 +87,27 @@ public static class GSRowInstancesComposite extends GSInstancesComposite {

}

@BackgroundColor("Red")
@DirectSelect(Car.class)
@ReactorDependencies({ GSAttributesContentComponent.class })
@org.genericsystem.reactor.annotations.Style.BackgroundColor("Red")
@org.genericsystem.reactor.annotations.DirectSelect(Car.class)
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSAttributesContentComponent.class })
public static class GSAttributesComposite extends GSInstancesComposite {
@ForEach(ObservableListExtractor.ATTRIBUTES_OF_TYPE.class)
public static class GSAttributesContentComponent extends GSInstancesContentComponent {

}
}

@BackgroundColor("Orange")
@DirectSelect(Car.class)
@FlexDirection("row")
@Flex("1 1 0%")
@Overflow("hidden")
@ReactorDependencies({ GSHeaderComponent_.class, GSRowInstanceAttributesContentComponent.class })
@org.genericsystem.reactor.annotations.Style.BackgroundColor("Orange")
@org.genericsystem.reactor.annotations.DirectSelect(Car.class)
@org.genericsystem.reactor.annotations.Style.FlexDirection("row")
@org.genericsystem.reactor.annotations.Style.Flex("1 1 0%")
@org.genericsystem.reactor.annotations.Style.Overflow("hidden")
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSHeaderComponent_.class, GSRowInstanceAttributesContentComponent.class })
public static class GSInstanceRowLabeledAttributesComposite extends GSRowLabeledTypeAttributesComposite {
@Flex("1 1 0%")
@Overflow("hidden")
@ReactorDependencies({ GSHeaderComponentLabel2.class })
public static class GSHeaderComponent_ extends CompositeTagImpl {
@org.genericsystem.reactor.annotations.Style.Flex("1 1 0%")
@org.genericsystem.reactor.annotations.Style.Overflow("hidden")
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSHeaderComponentLabel2.class })
public static class GSHeaderComponent_ extends org.genericsystem.reactor.gs3.CompositeTagImpl {
public static class GSHeaderComponentLabel2 extends GSLabelDisplayer {

}
Expand All @@ -121,43 +119,43 @@ public static class GSRowInstanceAttributesContentComponent extends GSTypeAttrib
}
}

@BackgroundColor("Purple")
@DirectSelect(Car.class)
@FlexDirection("row")
@ReactorDependencies({ GSTypeAttributesContentComponent.class })
@org.genericsystem.reactor.annotations.Style.BackgroundColor("Purple")
@org.genericsystem.reactor.annotations.DirectSelect(Car.class)
@org.genericsystem.reactor.annotations.Style.FlexDirection("row")
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSTypeAttributesContentComponent.class })
public static class GSRowLabeledTypeAttributesComposite extends GSAttributesComposite {
@FlexDirection("row")
public static class GSTypeAttributesContentComponent extends GSAttributesContentComponent {

}
}

@BackgroundColor("Grey")
@Style.Color("White")
@DirectSelect(Car.class)
@ReactorDependencies({ GSHeaderComponent.class, GSTypeAttributesContentComponent.class })
@org.genericsystem.reactor.annotations.Style.BackgroundColor("Grey")
@org.genericsystem.reactor.annotations.Style.Color("White")
@org.genericsystem.reactor.annotations.DirectSelect(Car.class)
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSHeaderComponent.class, GSTypeAttributesContentComponent.class })
public static class GSTypeRowLabeledTypeAttributesComposite extends GSRowLabeledTypeAttributesComposite {
@Flex("1 1 0%")
@Overflow("hidden")
@FlexDirection("row")
@ReactorDependencies({ GSHeaderComponentLabel.class })
public static class GSHeaderComponent extends CompositeTagImpl {
@org.genericsystem.reactor.annotations.Style.Flex("1 1 0%")
@org.genericsystem.reactor.annotations.Style.Overflow("hidden")
@org.genericsystem.reactor.annotations.Style.FlexDirection("row")
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSHeaderComponentLabel.class })
public static class GSHeaderComponent extends org.genericsystem.reactor.gs3.CompositeTagImpl {
public static class GSHeaderComponentLabel extends GSLabelDisplayer {

}
}
}

@DirectSelect(Car.class)
@ReactorDependencies({ GSHeaderComponent___.class, GSInstancesContentComponent__.class })
@org.genericsystem.reactor.annotations.DirectSelect(Car.class)
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSHeaderComponent___.class, GSInstancesContentComponent__.class })
public static class GSTypeLabeledInstancesComposite extends GSInstancesComposite {
@FlexDirection("row")
public static class GSHeaderComponent___ extends GSTypeRowLabeledTypeAttributesComposite {

}

@ReactorDependencies({ GSInstanceRowLabeledAttributesComposite_.class })
@FlexDirection("row")
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSInstanceRowLabeledAttributesComposite_.class })
@org.genericsystem.reactor.annotations.Style.FlexDirection("row")
public static class GSInstancesContentComponent__ extends GSInstancesContentComponent {
public static class GSInstanceRowLabeledAttributesComposite_ extends GSInstanceRowLabeledAttributesComposite {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
package org.genericsystem.example.reactor;

import org.genericsystem.api.core.annotations.Components;
import org.genericsystem.api.core.annotations.Meta;
import org.genericsystem.api.core.annotations.SystemGeneric;
import org.genericsystem.api.core.annotations.value.IntValue;
import org.genericsystem.api.core.annotations.value.StringValue;
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.AudiTT;
import org.genericsystem.example.reactor.AppHtml5.AudiTT.AudiTTGreen;
import org.genericsystem.example.reactor.AppHtml5.AudiTT.AudiTTPower;
import org.genericsystem.example.reactor.AppHtml5.AudiTT.Green;
import org.genericsystem.example.reactor.AppHtml5.GSCell.GSCellContentComponent;
import org.genericsystem.example.reactor.AppHtml5.GSCell.GSCellContentComponent.GSSubcell;
import org.genericsystem.example.reactor.AppHtml5.GSInstancesComposite;
import org.genericsystem.example.reactor.AppHtml5.GSRowInstancesComposite;
import org.genericsystem.example.reactor.AppHtml5.GSTypeAttributes;
Expand All @@ -20,14 +31,18 @@
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.example.reactor.AppHtml5.GSTypeTableInstancesComposite.GSInstanceContentComponent__.GSInstanceAttributesRow__.GSHoldersContentComponent.GSCell__;
import org.genericsystem.example.reactor.AppHtml5.GSTypeTableInstancesComposite.GSInstanceContentComponent__.GSInstanceAttributesRow__.GSInstanceNameComponent;
import org.genericsystem.example.reactor.AppHtml5.GSTypeTableInstancesComposite.GSInstanceContentComponent__.GSInstanceAttributesRow__.GSInstanceNameComponent.GSInstanceNameSubcell_;
import org.genericsystem.example.reactor.AppHtml5.TestCell;
import org.genericsystem.example.reactor.AppHtml5.TestCell.GSCell_;
import org.genericsystem.example.reactor.AppHtml5.Unit;
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;
Expand All @@ -41,9 +56,9 @@
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 })
@DependsOnModel({ Car.class, Power.class, UsedCar.class, Color.class, CarColor.class, CarColor2.class, AudiTT.class, Green.class, AudiTTGreen.class, AudiTTPower.class, Unit.class })
@RunScript(ExampleReactorScript.class)
@ReactorDependencies({ GSInstancesComposite.class, GSRowInstancesComposite.class, GSTypeAttributes.class, GSTypeAttributesRow.class, GSTypeLabeledInstancesComposite.class, GSTypeTableInstancesComposite.class })
@ReactorDependencies({ GSInstancesComposite.class, GSRowInstancesComposite.class, GSTypeAttributes.class, GSTypeAttributesRow.class, GSTypeLabeledInstancesComposite.class, GSTypeTableInstancesComposite.class, TestCell.class })
@FlexWrap("wrap")
@FlexDirection("row")
@Flex("1 1 0%")
Expand All @@ -53,10 +68,10 @@ 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 {
@org.genericsystem.reactor.annotations.Style.BackgroundColor("Green")
@org.genericsystem.reactor.annotations.DirectSelect(Car.class)
@org.genericsystem.reactor.annotations.ForEach.ChildForEach(ObservableListExtractor.SUBINSTANCES.class)
public static class GSInstancesComposite extends org.genericsystem.reactor.gs3.GSComposite {

}

Expand All @@ -81,61 +96,128 @@ public static class GSTypeAttributes extends GSComposite {
@DirectSelect(Car.class)
@FlexDirection("row")
@ChildForEach(ObservableListExtractor.ATTRIBUTES_OF_TYPE.class)
@ChildFlexDirection("row")
@ChildFlexDirection("row")
@ReactorDependencies({ GSHeaderComponent.class, GSContentComponent.class })
public static class GSTypeAttributesRow extends GSComposite {

}

@BackgroundColor("Orange")
@org.genericsystem.reactor.annotations.Style.BackgroundColor("Orange")
@org.genericsystem.reactor.annotations.Style.FlexDirection("row")
@org.genericsystem.reactor.annotations.Style.ChildFlexDirection("row")
@org.genericsystem.reactor.annotations.ForEach.ChildForEach(ObservableListExtractor.ATTRIBUTES_OF_INSTANCES.class)
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSHeaderComponent.class, GSContentComponent.class })
public static class GSInstanceAttributesRow extends org.genericsystem.reactor.gs3.GSComposite {

}

@org.genericsystem.reactor.annotations.Style.BackgroundColor("Brown")
@org.genericsystem.reactor.annotations.ForEach.ChildForEach(ObservableListExtractor.HOLDERS.class)
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSContentComponent.class })
public static class GSHolders extends org.genericsystem.reactor.gs3.GSComposite {

}

@BackgroundColor("Pink")
@FlexDirection("row")
@ChildFlexDirection("row")
@ChildForEach(ObservableListExtractor.ATTRIBUTES_OF_INSTANCES.class)
@ChildForEach(ObservableListExtractor.COMPONENTS.class)
@ReactorDependencies({ GSHeaderComponent.class, GSContentComponent.class })
public static class GSInstanceAttributesRow extends GSComposite {
public static class GSValueComponents extends GSComposite {

}

@BackgroundColor("Brown")
@ChildForEach(ObservableListExtractor.HOLDERS.class)
@ReactorDependencies({ GSContentComponent.class })
public static class GSHolders extends GSComposite {
@SystemGeneric
@Meta(Car.class)
@StringValue("Audi TT")
public static class AudiTT {

@SystemGeneric
@Meta(Color.class)
@StringValue("green")
public static class Green {

}

@Meta(Power.class)
@IntValue(432)
@SystemGeneric
@Components(AudiTT.class)
public static class AudiTTPower {
}

@Meta(CarColor.class)
@SystemGeneric
@Components({ AudiTT.class, Green.class })
public static class AudiTTGreen {

}
}

@DirectSelect(Car.class)
@ReactorDependencies({ GSHeaderComponent_.class, GSInstanceContentComponent_.class })
@org.genericsystem.reactor.annotations.DirectSelect(AudiTT.class)
@org.genericsystem.reactor.annotations.ReactorDependencies(GSCell_.class)
public static class TestCell extends org.genericsystem.reactor.gs3.GSComposite {
@DirectSelect(CarColor.class)
public static class GSCell_ extends GSCell {

}
}

@org.genericsystem.reactor.annotations.ReactorDependencies(GSCellContentComponent.class)
public static class GSCell extends GSHolders {
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSSubcell.class })
public static class GSCellContentComponent extends GSContentComponent {
public static class GSSubcell extends GSValueComponents {

}
}
}

@org.genericsystem.reactor.annotations.DirectSelect(Car.class)
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSHeaderComponent_.class, GSInstanceContentComponent_.class })
public static class GSTypeLabeledInstancesComposite extends GSInstancesComposite {
@ReactorDependencies({ GSTypeAttributesRow_.class })
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSTypeAttributesRow_.class })
public static class GSHeaderComponent_ extends GSHeaderComponent {
public static class GSTypeAttributesRow_ extends GSTypeAttributesRow {

}
}

@ReactorDependencies({ GSInstanceAttributesRow_.class })
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSInstanceAttributesRow_.class })
public static class GSInstanceContentComponent_ extends GSContentComponent {
public static class GSInstanceAttributesRow_ extends GSInstanceAttributesRow {

}
}
}

@DirectSelect(Car.class)
@ReactorDependencies({ GSHeaderComponent_.class, GSInstanceContentComponent__.class })
@SystemGeneric
@Components(Power.class)
@StringValue("Unit")
public static class Unit {
}

@org.genericsystem.reactor.annotations.DirectSelect(Power.class)
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSHeaderComponent_.class, GSInstanceContentComponent__.class })
public static class GSTypeTableInstancesComposite extends GSTypeLabeledInstancesComposite {
@ReactorDependencies({ GSInstanceAttributesRow__.class })
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSInstanceAttributesRow__.class })
public static class GSInstanceContentComponent__ extends GSInstanceContentComponent_ {
@ReactorDependencies({ GSHeaderComponent.class, GSHoldersContentComponent.class })
@org.genericsystem.reactor.annotations.ReactorDependencies({ GSInstanceNameComponent.class, GSHoldersContentComponent.class })
public static class GSInstanceAttributesRow__ extends GSInstanceAttributesRow_ {
@ReactorDependencies({ GSHolders_.class })
@org.genericsystem.reactor.annotations.ReactorDependencies(GSInstanceNameSubcell_.class)
public static class GSInstanceNameComponent extends GSHeaderComponent {
@BackgroundColor("Orange")
public static class GSInstanceNameSubcell_ extends GSValueComponents {

}
}

@org.genericsystem.reactor.annotations.ReactorDependencies({ GSCell__.class })
public static class GSHoldersContentComponent extends GSContentComponent {
public static class GSHolders_ extends GSHolders {
public static class GSCell__ extends GSCell {

}
}
}
}
}

}
Loading

0 comments on commit a07fde5

Please sign in to comment.