Class zebkit.layout.FlowLayout
mixed with <zebkit.layout.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.setLayout(new zebkit.layout.FlowLayout("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])

  • [ax] <String>

    ("left" by default) horizontal alignment:

  • [ay] <String>

    ("top" by default) vertical alignment:

  • [dir] <String>

    ("horizontal" by default) a direction the component has to be placed in the layout

  • [gap] <Integer>

    a space in pixels between laid out components

Inherited methods:

public <String> ax

Horizontal laid out components alignment

public <String> ay

Vertical laid out components alignment

public <String> direction

Laid out components direction

public <Integer> 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.