new GOWN.layout.VerticalLayout()
VerticalLayout - just sets the alignment to
LayoutAlignment.VERTICAL_ALIGNMENT
Extends
Members
-
alignmentString
-
The alignment of the layout
- Default Value:
- LayoutAlignment.VERTICAL_ALIGNMENT
-
firstGapNumber
-
The space between the first and second element
-
gapNumber
-
The space, in pixels, between items.
- Default Value:
- 0
-
lastGapNumber
-
The space between the last and second-to-last element
-
readonlyneedUpdate
-
Indicates if the layout needs to be rearranged.
-
paddingNumber
-
Shortcut to set all paddings (left, right, top, bottom)
- Default Value:
- 0
-
paddingBottomNumber
-
The minimum space, in pixels, below the items.
- Default Value:
- 0
-
paddingLeftNumber
-
The space, in pixels, that appears to the left, before the first item.
- Default Value:
- 0
-
paddingTopNumber
-
The minimum space, in pixels, above the items.
- Default Value:
- 0
Methods
-
inherited applyFixedPercent(items, explicit, alignment)
-
Apply percentage width/height to items. This will use the explicit width/height and apply it to all items according to its percentages. Percentages have higher priorities than fixed values. So if you set a width higher than 0 but also percentWidth, the width will be recalculated according to percentWidth.
Name Type Default Description itemsArray The items which get new width and height according to the percent explicitNumber The space we have for the components alignmentString LayoutAlignment.VERTICAL_ALIGNMENT optional The alignment mode -
inherited applyPercent(items, explicit)
-
Apply percentage width/height to items. This will stack items on top/aside of each other Percentages have higher priorities than fixed values. So if you set a width higher than 0 but also percentWidth, the width will be recalculated according to percentWidth. (this function will handle padding and gap, so the explicitWidth is for the whole available width)
Name Type Description itemsArray The items which get new width and height according to the percent explicitNumber space we have for the components -
inherited layout(items, maxWidth, maxHeight)
-
Position (and possibly resize) the supplied items.
Name Type Description itemsArray The items that will be layouted maxWidthNumber The maximum width for the items maxHeightNumber The maximum height for the items Returns:
Number[] The width and height -
inherited layoutContainer(container)
-
Calculate the layout for a container (and its children)
Name Type Description containerThe container to calculate the layout for Returns:
Number[] The width and height