From bd04f29ad5feffba71569cc8ae39d96d159eed6d Mon Sep 17 00:00:00 2001 From: Fabienne Ducroquet Date: Wed, 12 Oct 2016 16:37:48 +0200 Subject: [PATCH] gs-reactor, gs-carcolor: Simplify annotations --- .../genericsystem/carcolor/GSUserGuide.java | 2 - .../reactor/gscomponents3/GSComposite.java | 25 ++------- .../gscomponents3/InstanceBuilder.java | 4 +- .../reactor/gscomponents3/InstanceEditor.java | 15 ++---- .../gscomponents3/InstanceStepEditor.java | 21 +++----- .../reactor/gscomponents3/InstancesTable.java | 33 +++++------- .../reactor/gscomponents3/Modal.java | 6 +-- .../reactor/gscomponents3/Monitor.java | 53 ++++++------------- .../reactor/gscomponents3/Table.java | 7 +-- 9 files changed, 50 insertions(+), 116 deletions(-) diff --git a/gs-carcolor/src/main/java/org/genericsystem/carcolor/GSUserGuide.java b/gs-carcolor/src/main/java/org/genericsystem/carcolor/GSUserGuide.java index 7cc040c16..016bf1bf1 100644 --- a/gs-carcolor/src/main/java/org/genericsystem/carcolor/GSUserGuide.java +++ b/gs-carcolor/src/main/java/org/genericsystem/carcolor/GSUserGuide.java @@ -12,8 +12,6 @@ public class GSUserGuide extends GSDiv { public GSUserGuide(Tag parent) { super(parent, FlexDirection.COLUMN); - addStyle("flex-direction", "column"); - addStyle("flex-wrap", "nowrap"); addStyle("justify-content", "center"); GSDiv gSection = new GSDiv(this, FlexDirection.COLUMN) { diff --git a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/GSComposite.java b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/GSComposite.java index 3ee507e3c..edd771d3f 100644 --- a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/GSComposite.java +++ b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/GSComposite.java @@ -9,42 +9,27 @@ import org.genericsystem.reactor.gscomponents.GSDiv; import org.genericsystem.reactor.gscomponents3.GSComposite.Content; import org.genericsystem.reactor.gscomponents3.GSComposite.Footer; -import org.genericsystem.reactor.gscomponents3.GSComposite.Footer.FooterLabel; import org.genericsystem.reactor.gscomponents3.GSComposite.Header; -import org.genericsystem.reactor.gscomponents3.GSComposite.Header.HeaderLabel; @Style(name = "flex", value = "1 1 0%") @Style(name = "overflow", value = "hidden") +@Style(path = GSDiv.class, name = "flex", value = "1 1 0%") +@Style(path = GSDiv.class, name = "overflow", value = "hidden") @ReactorDependencies({ GSComposite.Content.class }) @FlexDirectionStyle(path = Content.class, value = FlexDirection.COLUMN) @FlexDirectionStyle(path = Header.class, value = FlexDirection.COLUMN) @FlexDirectionStyle(path = Footer.class, value = FlexDirection.COLUMN) -@ReactorDependencies(path = Content.class, value = Content.ContentLabel.class) -@ReactorDependencies(path = Header.class, value = HeaderLabel.class) -@ReactorDependencies(path = Footer.class, value = FooterLabel.class) +@ReactorDependencies(path = Content.class, value = GSLabelDisplayer.class) +@ReactorDependencies(path = Header.class, value = GSLabelDisplayer.class) +@ReactorDependencies(path = Footer.class, value = GSLabelDisplayer.class) public abstract class GSComposite extends GSDiv { - @Style(name = "flex", value = "1 1 0%") - @Style(name = "overflow", value = "hidden") public static class Content extends GSDiv { - public static class ContentLabel extends GSLabelDisplayer { - - } } - @Style(name = "flex", value = "1 1 0%") - @Style(name = "overflow", value = "hidden") public static class Header extends GSDiv { - public static class HeaderLabel extends GSLabelDisplayer { - - } } - @Style(name = "flex", value = "1 1 0%") - @Style(name = "overflow", value = "hidden") public static class Footer extends GSDiv { - public static class FooterLabel extends GSLabelDisplayer { - - } } } \ No newline at end of file diff --git a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstanceBuilder.java b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstanceBuilder.java index 489ccdaab..3054c96ad 100644 --- a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstanceBuilder.java +++ b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstanceBuilder.java @@ -14,7 +14,6 @@ import org.genericsystem.reactor.annotations.Select; import org.genericsystem.reactor.annotations.SetText; import org.genericsystem.reactor.annotations.Style; -import org.genericsystem.reactor.annotations.Style.ReverseFlexDirection; import org.genericsystem.reactor.gscomponents.GSInputTextWithConversion; import org.genericsystem.reactor.gscomponents2.GSInstanceBuilder.BuilderCell.BooleanHolderBuilder.CheckboxContainerBuildDiv.BooleanHolderBuilderInput; import org.genericsystem.reactor.gscomponents2.GSInstanceBuilder.BuilderCell.HolderBuilder.HolderBuilderInput; @@ -38,13 +37,12 @@ import javafx.beans.binding.Bindings; import javafx.beans.value.ObservableValue; -@ReverseFlexDirection @Style(path = GSInputTextWithConversion.class, name = "flex", value = "1") @Style(path = GSInputTextWithConversion.class, name = "width", value = "100%") @ReactorDependencies({ GSInputTextWithConversion.class, Content.class, ButtonDiv.class }) @ReactorDependencies(path = Content.class, value = { GSHolderBuilder.class, GSMultiCheckboxBuilder.class }) @ReactorDependencies(path = ButtonDiv.class, value = AddButton.class) -@ForEach(path = { Content.class }, value = ObservableListExtractor.ATTRIBUTES_OF_TYPE.class) +@ForEach(path = Content.class, value = ObservableListExtractor.ATTRIBUTES_OF_TYPE.class) @Select(path = { Content.class, GSHolderBuilder.class }, value = NON_MULTICHECKBOX_SELECTOR_RELATION.class) @Select(path = { Content.class, GSMultiCheckbox.class }, value = MULTICHECKBOX_SELECTOR_RELATION.class) public class InstanceBuilder extends GSComposite implements GSBuilderDefaults { diff --git a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstanceEditor.java b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstanceEditor.java index 4125defe8..78a470e93 100644 --- a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstanceEditor.java +++ b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstanceEditor.java @@ -65,20 +65,15 @@ @Style(path = HeaderRow.class, name = "flex", value = "0.3") @Style(path = ContentRow.class, name = "flex", value = "1") @Style(path = HeaderRow.class, name = "color", value = "white") -@GenericValueBackgroundColor(path = { HeaderRow.class, GSValueComponents.class, Content.class }, value = "#ea0084") -@GenericValueBackgroundColor(path = { HeaderRow.class, GSValueComponents.class, Header.class }, value = "#ea0084") -@GenericValueBackgroundColor(path = { HeaderRow.class, Content.class, GSValueComponents.class, Content.class }, value = "#ea0084") -@GenericValueBackgroundColor(path = { HeaderRow.class, Content.class, GSValueComponents.class, Header.class }, value = "#ea0084") +@GenericValueBackgroundColor(path = { HeaderRow.class, GSValueComponents.class, GSDiv.class }, value = "#ea0084") @ReactorDependencies({ HeaderRow.class, ContentRow.class }) -@ReactorDependencies(path = HeaderRow.class, value = { GSValueComponents.class, Content.class }) -@ReactorDependencies(path = { HeaderRow.class, Content.class }, value = GSValueComponents.class) +@ReactorDependencies(path = HeaderRow.class, value = { GSValueComponents.class, GSValueComponents.class }) @ReactorDependencies(path = ContentRow.class, value = { GSValueComponentsEditor.class, AttributeContent.class }) @ReactorDependencies(path = { ContentRow.class, GSValueComponentsEditor.class }, value = { Header.class, Content.class }) @ReactorDependencies(path = { ContentRow.class, Content.class }, value = { GSHoldersEditor.class, GSMultiCheckbox.class }) -@ForEach(path = { HeaderRow.class, Content.class }, value = ObservableListExtractor.ATTRIBUTES_OF_INSTANCES.class) -@ForEach(path = { HeaderRow.class, Content.class, GSValueComponents.class, Content.class }, value = ObservableListExtractor.OTHER_COMPONENTS_2.class) -@ForEach(path = { ContentRow.class, GSValueComponents.class, Content.class }, value = ObservableListExtractor.OTHER_COMPONENTS_2.class) -@Select(path = { HeaderRow.class, GSValueComponents.class }, value = TYPE_SELECTOR.class) +@ForEach(path = { HeaderRow.class, GSValueComponents.class }, pos = { 0, 1 }, value = ObservableListExtractor.ATTRIBUTES_OF_INSTANCES.class) +@ForEach(path = { GSComposite.class, GSValueComponents.class, Content.class }, value = ObservableListExtractor.OTHER_COMPONENTS_2.class) +@Select(path = { HeaderRow.class, GSValueComponents.class }, pos = { 0, 0 }, value = TYPE_SELECTOR.class) public class InstanceEditor extends Table implements SelectionDefaults { @FlexDirectionStyle(FlexDirection.COLUMN) diff --git a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstanceStepEditor.java b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstanceStepEditor.java index df81ecea1..45455c4f0 100644 --- a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstanceStepEditor.java +++ b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstanceStepEditor.java @@ -32,25 +32,20 @@ import org.genericsystem.reactor.model.ObservableListExtractor; import org.genericsystem.reactor.model.ObservableValueSelector.TYPE_SELECTOR; -@Style(path = { HeaderRow.class, GSValueComponents.class }, name = "flex", value = "0.3") -@Style(path = { ContentRow.class, GSValueComponents.class }, name = "flex", value = "0.3") -@Style(path = ContentRow.class, name = "flex", value = "1") -@Style(path = { HeaderRow.class, GSValueComponents.class }, name = "color", value = "white") -@Style(path = { ContentRow.class, GSValueComponents.class }, name = "color", value = "white") -@GenericValueBackgroundColor(path = { HeaderRow.class, GSValueComponents.class, Content.class }, value = "#ea0084") -@GenericValueBackgroundColor(path = { HeaderRow.class, GSValueComponents.class, Header.class }, value = "#ea0084") -@GenericValueBackgroundColor(path = { ContentRow.class, GSValueComponents.class, Content.class }, value = "#ea0084") -@GenericValueBackgroundColor(path = { ContentRow.class, GSValueComponents.class, Header.class }, value = "#ea0084") +@Style(path = { GSComposite.class, GSValueComponents.class }, pos = { 0, 0 }, name = "flex", value = "0.3") +@Style(path = { GSComposite.class, GSValueComponents.class }, pos = { 1, 0 }, name = "flex", value = "0.3") +@Style(path = { GSComposite.class, GSValueComponents.class }, name = "color", value = "white") +@Style(path = { GSComposite.class, StepNavigator.class }, name = "flex", value = "") +@GenericValueBackgroundColor(path = { GSComposite.class, GSValueComponents.class, GSDiv.class }, value = "#ea0084") @ReactorDependencies({ HeaderRow.class, ContentRow.class }) -@ReactorDependencies(path = HeaderRow.class, value = { GSValueComponents.class, Content.class, StepNavigator.class }) -@ReactorDependencies(path = { HeaderRow.class, Content.class }, value = GSValueComponentsEditor.class) +@ReactorDependencies(path = HeaderRow.class, value = { GSValueComponents.class, GSValueComponentsEditor.class, StepNavigator.class }) @ReactorDependencies(path = ContentRow.class, value = { GSValueComponents.class, AttributeContent.class, StepNavigator.class }) @ReactorDependencies(path = { ContentRow.class, Content.class }, value = { GSHoldersEditor.class, GSMultiCheckbox.class }) -@ReactorDependencies(path = { HeaderRow.class, Content.class, GSValueComponentsEditor.class }, value = { Header.class, Content.class }) +@ReactorDependencies(path = { HeaderRow.class, GSValueComponentsEditor.class }, value = { Header.class, Content.class }) @ForEach(path = ContentRow.class, value = ObservableListExtractor.ATTRIBUTES_OF_INSTANCES.class) @ForEach(path = { ContentRow.class, AttributeContent.class }, value = ObservableListExtractor.NO_FOR_EACH.class) @ForEach(path = { ContentRow.class, GSValueComponents.class, Content.class }, value = ObservableListExtractor.OTHER_COMPONENTS_2.class) -@Select(path = { HeaderRow.class, GSValueComponents.class }, value = TYPE_SELECTOR.class) +@Select(path = { HeaderRow.class, GSValueComponents.class }, pos = { 0, 0 }, value = TYPE_SELECTOR.class) @Stepper(switchClass = ContentRow.class, headerClass = HeaderRow.class) public class InstanceStepEditor extends Table implements SelectionDefaults, StepperDefaults { diff --git a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstancesTable.java b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstancesTable.java index d804456f3..9d6a2d0cb 100644 --- a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstancesTable.java +++ b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/InstancesTable.java @@ -4,6 +4,7 @@ import org.genericsystem.reactor.htmltag.HtmlButton; import org.genericsystem.reactor.htmltag.HtmlHyperLink; +import org.genericsystem.reactor.htmltag.HtmlLabel.GSLabelDisplayer; import org.genericsystem.reactor.annotations.BindAction; import org.genericsystem.reactor.annotations.BindSelection; @@ -21,7 +22,6 @@ import org.genericsystem.reactor.gscomponents.GSDiv; import org.genericsystem.reactor.gscomponents3.GSComposite.Content; import org.genericsystem.reactor.gscomponents3.GSComposite.Header; -import org.genericsystem.reactor.gscomponents3.GSComposite.Header.HeaderLabel; import org.genericsystem.reactor.gscomponents3.InstancesTable.ButtonDiv; import org.genericsystem.reactor.gscomponents3.InstancesTable.GSHolders; import org.genericsystem.reactor.gscomponents3.InstancesTable.GSValueComponents; @@ -35,21 +35,17 @@ import org.genericsystem.reactor.model.ObservableValueSelector; @BindSelection(ContentRow.class) +@GenericValueBackgroundColor(path = { HeaderRow.class, GSValueComponents.class, GSDiv.class }, value = "#ea0084") +@GenericValueBackgroundColor(path = { ContentRow.class, GSValueComponents.class, Header.class }, value = "#3393ff") @Style(path = HeaderRow.class, name = "color", value = "white") -@GenericValueBackgroundColor(path = { HeaderRow.class, GSValueComponents.class, Content.class }, value = "#ea0084") -@GenericValueBackgroundColor(path = { HeaderRow.class, GSValueComponents.class, Header.class }, value = "#ea0084") -@GenericValueBackgroundColor(path = { HeaderRow.class, Content.class, GSValueComponents.class, Content.class }, value = "#ea0084") -@GenericValueBackgroundColor(path = { HeaderRow.class, Content.class, GSValueComponents.class, Header.class }, value = "#ea0084") @Style(path = { ContentRow.class, GSValueComponents.class, Header.class, InstanceNameLink.class }, name = "color", value = "white") -@GenericValueBackgroundColor(path = { ContentRow.class, GSValueComponents.class, Header.class }, value = "#3393ff") @Style(path = { ContentRow.class, GSValueComponents.class, Header.class }, name = "align-items", value = "flex-start") @ReactorDependencies({ HeaderRow.class, InstanceBuilder.class, ContentRow.class }) -@ReactorDependencies(path = HeaderRow.class, value = { GSValueComponents.class, Content.class, ButtonDiv.class }) -@ReactorDependencies(path = { HeaderRow.class, Content.class }, value = GSValueComponents.class) +@ReactorDependencies(path = HeaderRow.class, value = { GSValueComponents.class, GSValueComponents.class, ButtonDiv.class }) @ReactorDependencies(path = ContentRow.class, value = { GSValueComponents.class, GSHolders.class, ButtonDiv.class }) @ReactorDependencies(path = { ContentRow.class, GSValueComponents.class, Header.class }, value = InstanceNameLink.class) @ReactorDependencies(path = { ContentRow.class, ButtonDiv.class }, value = RemoveButton.class) -@ForEach(path = { HeaderRow.class, Content.class }, value = ObservableListExtractor.ATTRIBUTES_OF_TYPE.class) +@ForEach(path = { HeaderRow.class, GSValueComponents.class }, pos = { 0, 1 }, 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) @@ -61,28 +57,23 @@ public static class HorizontalInstancesTable extends InstancesTable { @GenericValueBackgroundColor(path = { GSValueComponents.class, Content.class }, value = "#e5ed00") @ReactorDependencies(value = GSValueComponents.class) - @ReactorDependencies(path = { GSValueComponents.class, Header.class }, value = { HeaderLabel.class, GSCheckBoxDisplayer.class }) + @ReactorDependencies(path = { GSValueComponents.class, Header.class }, value = { GSLabelDisplayer.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, GSLabelDisplayer.class }, value = ObservableValueSelector.LABEL_DISPLAYER.class) @Select(path = { GSValueComponents.class, Header.class, GSCheckBoxEditor.class }, value = ObservableValueSelector.CHECK_BOX_DISPLAYER.class) public static class GSHolders extends GSComposite { } @FlexDirectionStyle(FlexDirection.ROW) - @Style(path = Content.class, name = "background-color", value = "#e5ed00") - @Style(path = Header.class, name = "background-color", value = "#e5ed00") - @Style(path = Header.class, name = "justify-content", value = "center") - @Style(path = Header.class, name = "align-items", value = "center") - @Style(path = Content.class, name = "justify-content", value = "center") - @Style(path = Content.class, name = "align-items", value = "center") + @Style(path = GSDiv.class, name = "background-color", value = "#e5ed00") + @Style(path = GSDiv.class, name = "justify-content", value = "center") + @Style(path = GSDiv.class, name = "align-items", value = "center") + @Style(path = GSDiv.class, name = "margin-right", value = "1px") + @Style(path = GSDiv.class, name = "margin-bottom", value = "1px") @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 }) - @Style(path = Header.class, name = "margin-right", value = "1px") - @Style(path = Header.class, name = "margin-bottom", value = "1px") - @Style(path = Content.class, name = "margin-right", value = "1px") - @Style(path = Content.class, name = "margin-bottom", value = "1px") public static class GSValueComponents extends GSComposite { } diff --git a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/Modal.java b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/Modal.java index de967ff54..c02e20a4c 100644 --- a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/Modal.java +++ b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/Modal.java @@ -16,16 +16,16 @@ import javafx.beans.binding.Bindings; -@StyleClass("modal") @ReactorDependencies(GSDiv.class) @ReactorDependencies(path = GSDiv.class, value = HtmlHyperLink.class) -@Style(path = GSDiv.class, name = "max-width", value = "40%") +@StyleClass("modal") @StyleClass(path = GSDiv.class, value = "modal-content") +@StyleClass(path = { GSDiv.class, HtmlHyperLink.class }, value = "close") +@Style(path = GSDiv.class, name = "max-width", value = "40%") @Style(path = GSDiv.class, name = "padding", value = "10px") @Style(path = GSDiv.class, name = "border-radius", value = "10px") @Style(path = GSDiv.class, name = "background-color", value = "white") @SelectModel(path = { GSDiv.class, GSDiv.class }, value = SELECTION_SELECTOR.class) -@StyleClass(path = { GSDiv.class, HtmlHyperLink.class }, value = "close") @SetText(path = { GSDiv.class, HtmlHyperLink.class }, value = "×") @BindAction(path = { GSDiv.class, HtmlHyperLink.class }, value = RESET_SELECTION.class) public class Modal extends GSDiv implements SelectionDefaults { diff --git a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/Monitor.java b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/Monitor.java index 3f18f2b28..1c1d0de09 100644 --- a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/Monitor.java +++ b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/Monitor.java @@ -3,10 +3,6 @@ import org.genericsystem.reactor.htmltag.HtmlButton; import org.genericsystem.reactor.htmltag.HtmlLabel; -import org.genericsystem.reactor.gscomponents3.Monitor.CancelButton; -import org.genericsystem.reactor.gscomponents3.Monitor.FlushButton; -import org.genericsystem.reactor.gscomponents3.Monitor.LastUpdateLabel; - import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneOffset; @@ -21,6 +17,7 @@ import org.genericsystem.reactor.annotations.Style.FlexDirectionStyle; import org.genericsystem.reactor.gscomponents.FlexDirection; import org.genericsystem.reactor.gscomponents.GSDiv; +import org.genericsystem.reactor.gscomponents3.Monitor.LastUpdateLabel; import org.genericsystem.reactor.model.ContextAction.CANCEL; import org.genericsystem.reactor.model.ContextAction.FLUSH; import org.genericsystem.reactor.model.ContextAction.GC; @@ -30,28 +27,29 @@ import javafx.beans.binding.Bindings; -@ReactorDependencies({ FlushButton.class, CancelButton.class, LastUpdateLabel.class }) +@ReactorDependencies({ HtmlButton.class, HtmlButton.class, LastUpdateLabel.class }) +@SetText(path = HtmlButton.class, pos = 0, value = "Save") +@BindAction(path = HtmlButton.class, pos = 0, value = FLUSH.class) +@SetText(path = HtmlButton.class, pos = 1, value = "Cancel") +@BindAction(path = HtmlButton.class, pos = 1, value = CANCEL.class) @FlexDirectionStyle(FlexDirection.ROW) @Style(name = "justify-content", value = "space-around") @Style(name = "padding", value = "10px") public class Monitor extends GSDiv { - @ReactorDependencies({ FlushButton.class, CancelButton.class, MountButton.class, CacheLevel.class, UnmountButton.class, ShiftTSButton.class, LastUpdateLabel.class }) + @ReactorDependencies({ HtmlButton.class, HtmlButton.class, HtmlButton.class, CacheLevel.class, HtmlButton.class, HtmlButton.class, LastUpdateLabel.class/*, HtmlButton.class */ }) + @SetText(path = HtmlButton.class, pos = 2, value = "Mount") + @BindAction(path = HtmlButton.class, pos = 2, value = MOUNT.class) + @SetText(path = HtmlButton.class, pos = 3, value = "Unmount") + @BindAction(path = HtmlButton.class, pos = 3, value = UNMOUNT.class) + @SetText(path = HtmlButton.class, pos = 4, value = "ShiftTs") + @BindAction(path = HtmlButton.class, pos = 4, value = SHIFTTS.class) + @SetText(path = HtmlButton.class, pos = 5, value = "Collect") + @BindAction(path = HtmlButton.class, pos = 5, value = GC.class) public static class MonitorExtended extends Monitor { } - @SetText("Save") - @BindAction(FLUSH.class) - public static class FlushButton extends HtmlButton { - } - - @SetText("Cancel") - @BindAction(CANCEL.class) - public static class CancelButton extends HtmlButton { - } - public static class LastUpdateLabel extends HtmlLabel { - @Override public void init() { bindText(context -> Bindings.createStringBinding(() -> { @@ -64,31 +62,10 @@ public void init() { } } - @SetText("Collect") - @BindAction(GC.class) - public static class CollectButton extends HtmlButton { - } - - @SetText("Mount") - @BindAction(MOUNT.class) - public static class MountButton extends HtmlButton { - } - public static class CacheLevel extends HtmlLabel { - @Override public void init() { bindText(context -> Bindings.convert(context.getCacheLevelObservableValue())); } } - - @SetText("Unmount") - @BindAction(UNMOUNT.class) - public static class UnmountButton extends HtmlButton { - } - - @SetText("ShiftTS") - @BindAction(SHIFTTS.class) - public static class ShiftTSButton extends HtmlButton { - } } diff --git a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/Table.java b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/Table.java index 997cca91f..1ff94dbc0 100644 --- a/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/Table.java +++ b/gs-reactor/src/main/java/org/genericsystem/reactor/gscomponents3/Table.java @@ -8,21 +8,16 @@ @Style(name = "flex", value = "1 1 0%") @Style(name = "overflow", value = "hidden") +@ReverseFlexDirection(path = GSComposite.class) @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 { - } } \ No newline at end of file