-
Notifications
You must be signed in to change notification settings - Fork 5
Use Radio-button-groups in FlexLayout demos #152
Conversation
For better readability and consistency with the Horizontal and Vertical demos, use RBG element to choose a property.
// end-source-example | ||
|
||
layout.setId("flex-layout-with-alignment-content"); | ||
|
||
Consumer<FlexLayout.ContentAlignment> changeLayout = alignment -> layout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// end-source-example | ||
Consumer<FlexLayout.FlexDirection> flexDirectionConsumer = flexDirection -> layout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -82,26 +81,23 @@ private void createFlexLayoutWithAlignmentContent() { | |||
layout.setWidth("130px"); | |||
layout.setHeight("150px"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// end-source-example | ||
|
||
layout.setId("flex-layout-with-alignment-content"); | ||
|
||
Consumer<FlexLayout.ContentAlignment> changeLayout = alignment -> layout | ||
.setAlignContent(alignment); | ||
addCard("FlexLayout", "FlexLayout with alignment content", layout, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -82,26 +81,23 @@ private void createFlexLayoutWithAlignmentContent() { | |||
layout.setWidth("130px"); | |||
layout.setHeight("150px"); | |||
layout.getStyle().set("border", "1px solid #9E9E9E"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -82,26 +81,23 @@ private void createFlexLayoutWithAlignmentContent() { | |||
layout.setWidth("130px"); | |||
layout.setHeight("150px"); | |||
layout.getStyle().set("border", "1px solid #9E9E9E"); | |||
layout.setWrapMode(FlexLayout.WrapMode.WRAP); | |||
layout.setFlexWrap(FlexLayout.FlexWrap.WRAP); | |||
|
|||
Component component1 = createComponent(1, "#78909C"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -82,26 +81,23 @@ private void createFlexLayoutWithAlignmentContent() { | |||
layout.setWidth("130px"); | |||
layout.setHeight("150px"); | |||
layout.getStyle().set("border", "1px solid #9E9E9E"); | |||
layout.setWrapMode(FlexLayout.WrapMode.WRAP); | |||
layout.setFlexWrap(FlexLayout.FlexWrap.WRAP); | |||
|
|||
Component component1 = createComponent(1, "#78909C"); | |||
Component component2 = createComponent(2, "#546E7A"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// end-source-example | ||
|
||
RadioButtonGroup<String> widths = new RadioButtonGroup<>(); | ||
widths.setItems("200px", "100%", "auto"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -82,26 +81,23 @@ private void createFlexLayoutWithAlignmentContent() { | |||
layout.setWidth("130px"); | |||
layout.setHeight("150px"); | |||
layout.getStyle().set("border", "1px solid #9E9E9E"); | |||
layout.setWrapMode(FlexLayout.WrapMode.WRAP); | |||
layout.setFlexWrap(FlexLayout.FlexWrap.WRAP); | |||
|
|||
Component component1 = createComponent(1, "#78909C"); | |||
Component component2 = createComponent(2, "#546E7A"); | |||
Component component3 = createComponent(3, "#37474F"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rbg.setRenderer( | ||
new TextRenderer<>(enumValue -> enumValue.name().toLowerCase())); | ||
|
||
rbg.addValueChangeListener(e -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SonarQube analysis reported 18 issues Watch the comments in this conversation to review them. 7 extra issuesNote: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:
|
For better readability and consistency with the Horizontal and Vertical demos, use RBG element to choose a property.