public interface GridLayoutBuilder extends LayoutBuilder<com.vaadin.ui.GridLayout,GridLayoutBuilder>
GridLayout
instances.LayoutConfigurator.BaseLayoutConfigurator
ClickableLayoutConfigurator.BaseClickableLayoutConfigurator
ComponentConfigurator.BaseComponentConfigurator
Modifier and Type | Method and Description |
---|---|
GridLayoutBuilder |
add(com.vaadin.ui.Component component,
int column,
int row)
Adds the component to the grid in cells column1,row1 (NortWest corner of the area.)
|
GridLayoutBuilder |
add(com.vaadin.ui.Component component,
int column1,
int row1,
int column2,
int row2)
Adds a component to the grid in the specified area.
|
GridLayoutBuilder |
columnExpandRatio(int columnIndex,
float ratio)
Sets the expand ratio of given column.
|
GridLayoutBuilder |
columns(int columns)
Set the number of columns of the grid
|
GridLayoutBuilder |
hideEmptyRowsAndColumns()
Empty rows and columns will be considered as non-existent when rendering the grid, i.e. the spacing between
multiple empty columns (or rows) will be collapsed.
|
GridLayoutBuilder |
newLine()
Forces the next component to be added at the beginning of the next line.
|
GridLayoutBuilder |
rowExpandRatio(int rowIndex,
float ratio)
Sets the expand ratio of given row.
|
GridLayoutBuilder |
rows(int rows)
Set the number of rows of the grid
|
GridLayoutBuilder |
skip()
Moves the cursor forward by one.
|
addAndAlign, align, defaultAlignment, margin, marginBottom, marginLeft, marginRight, marginTop, spacing, withoutMargin, withoutSpacing
withLayoutClickListener
withLayoutClickListener
add, withComponentAttachListener, withComponentDetachListener
build, deferLocalization, dragSource, dropTarget
caption, caption, caption, captionAsHtml, description, description, description, disabled, errorHandler, fullHeight, fullSize, fullWidth, height, height, heightUndefined, hidden, icon, id, notVisible, primaryStyleName, replaceStyleName, responsive, sizeUndefined, styleName, width, width, widthUndefined, withAttachListener, withContextClickListener, withData, withDetachListener, withShortcutListener
GridLayoutBuilder columns(int columns)
columns
- Number of columnsGridLayoutBuilder rows(int rows)
rows
- Number of rowsGridLayoutBuilder add(com.vaadin.ui.Component component, int column, int row)
component
- the component to be added, not null
column
- the column index, starting from 0.row
- the row index, starting from 0.GridLayoutBuilder add(com.vaadin.ui.Component component, int column1, int row1, int column2, int row2)
If the area overlaps with any of the existing components already present in the grid, the operation will fail and
an GridLayout.OverlapsException
is thrown.
component
- the component to be added, not null
.column1
- the column of the upper left corner of the area component
is supposed to occupy. The
leftmost column has index 0.row1
- the row of the upper left corner of the area c
is supposed to occupy. The topmost row
has index 0.column2
- the column of the lower right corner of the area component
is supposed to occupy.row2
- the row of the lower right corner of the area component
is supposed to occupy.GridLayoutBuilder newLine()
Sets the cursor column to 0 and increments the cursor row by one.
GridLayoutBuilder skip()
GridLayoutBuilder columnExpandRatio(int columnIndex, float ratio)
The expand ratio defines how excess space is distributed among columns. Excess space means space that is left over from components that are not sized relatively. By default, the excess space is distributed evenly.
Note, that width of this GridLayout needs to be defined (fixed or relative, as opposed to undefined height) for this method to have any effect.
Note that checking for relative width for the child components is done on the server so you cannot set a child
component to have undefined width on the server and set it to 100%
in CSS. You must set it to
100%
on the server.
columnIndex
- Index of the column to expandratio
- Expand ratioGridLayoutBuilder rowExpandRatio(int rowIndex, float ratio)
Expand ratio defines how excess space is distributed among rows. Excess space means the space left over from components that are not sized relatively. By default, the excess space is distributed evenly.
Note, that height of this GridLayout needs to be defined (fixed or relative, as opposed to undefined height) for this method to have any effect.
Note that checking for relative height for the child components is done on the server so you cannot set a child
component to have undefined height on the server and set it to 100%
in CSS. You must set it to
100%
on the server.
rowIndex
- Index of the row to expandratio
- Expand ratioGridLayoutBuilder hideEmptyRowsAndColumns()
Copyright © 2018 The Holon Platform. All rights reserved.