|
Class
zebkit.layout.FlowLayout
mixed with <zebkit.layout.Layout> |
<zebkit.layout> |
Flow layout manager group and places components ordered with different vertical and horizontal alignments
// create panel and set flow layout for it
// components added to the panel will be placed
// horizontally aligned at the center of the panel
var p = new zebkit.ui.Panel();
p.setFlowLayout("center", "center");
// add three buttons into the panel with flow layout
p.add(new zebkit.ui.Button("Button 1"));
p.add(new zebkit.ui.Button("Button 2"));
p.add(new zebkit.ui.Button("Button 3"));
zebkit.layout.FlowLayout ([ax], [ay], [dir], [gap])
Parameters:
-
[ax]<String>("left" by default) horizontal alignment:
"left" "center" "right"
-
[ay]<String>("top" by default) vertical alignment:
"top" "center" "bottom"
-
[dir]<String>("horizontal" by default) a direction the component has to be placed in the layout
"vertical" "horizontal"
-
[gap]<Integer>a space in pixels between laid out components
|
public
gap
Gap between laid out components |
|
public
<Boolean>
stretchLast
Define if the last added component has to be stretched to occupy the rest of horizontal or vertical space of a parent component. |