-
Notifications
You must be signed in to change notification settings - Fork 24
API | ResponsiveRow
Jarek Toro edited this page Nov 8, 2016
·
7 revisions
Crucial Component works similar to a HorizontalLayout. Its job is to hold all of the ResponsiveColumn objects
-
setMargin(boolean margin)- Adds a margin around the
ResponsiveColumnsOn AllDisplaySizes.
- Adds a margin around the
-
setMarginSmall(boolean margin)- Adds a smaller margin around the
ResponsiveColumnsOn AllDisplaySizes. - Very useful when nesting Rows inside
ResponsiveColumns. .setMargin(true)is required for this method to work
- Adds a smaller margin around the
-
setMargin(MarginSize marginSize, ResponsiveColumn.DisplaySize displaySize, boolean margin)- Adds a margin based on size around the
ResponsiveColumnsOn the givenDisplaySize. - The
boolean margincan be set to false, which hides the margin on thatdisplaySize.
- Adds a margin based on size around the
-
setSpacing(boolean margin)- Adds a smaller margin in between (both Vertical and Horizontal) the
ResponsiveColumns.
- Adds a smaller margin in between (both Vertical and Horizontal) the
-
setVerticalSpacing(boolean margin)- Adds a smaller margin in between (Vertical Only) the
ResponsiveColumns.
- Adds a smaller margin in between (Vertical Only) the
-
setHorizontalSpacing(boolean margin)- Adds a smaller margin in between (Horizontal Only) the
ResponsiveColumns.
- Adds a smaller margin in between (Horizontal Only) the
-
setDefaultComponentAlignment(Alignment alignment)- Sets the alignment of the
ResponsiveColumnsit holds. - Currently only applies to all
ResponsiveColumns, You can't separate alignment for individualResponsiveColumns
- Sets the alignment of the
-
addColumn(ResponsiveColumn column)- Adds a column to the layout similar to
.addComponent(Component component).
- Adds a column to the layout similar to
-
addComponent(Component component)- Adds a component directly to the
row. - Useful when you add many components of various sizes because they will automagically wrap around depending on the screen size.
- Components added this way will be treated as first class citizens and get spacing and margin as if it was a
ResponsiveColumn.
- Adds a component directly to the
-
withAlignment(Alignment alignment)->ResponsiveRow- When called it applies the Alignment to itself then returns itself back.
-
withMargin(boolean margin)->ResponsiveRow- When called it applies the Margin to itself then returns itself back.
-
withSmallMargin(boolean margin)->ResponsiveRow- When called it applies the Small Margin to itself then returns itself back.
- Unlike calling
.setMarginSmall()you do not need to callsetMargin(true)first.
-
withSpacing(boolean spacing)->ResponsiveRow- When called it applies the Spacing to itself then returns itself back.
-
withVerticalSpacing(boolean spacing)->ResponsiveRow- When called it applies the Vertical Spacing to itself then returns itself back.
-
withHorizontalSpacing(boolean spacing)->ResponsiveRow- When called it applies the Horizontal Spacing to itself then returns itself back.
-
addColumn()->ResponsiveColumn- Convenience Method that add a
ResponsiveColumnto itself then returns theResponsiveColumn. - In effect it does this for you
ResponsiveColumn column = new ResponsiveColumn(); self.addColumn(ResponsiveColumn); return column;
- Convenience Method that add a
Responsive Layout aims to be the greatest Vaadin layout of all time! So help it become that: