class org.aswing.FlowLayout extends EmptyLayout
Sub classes | ||||
FlowWrapLayout |
|
A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. Flow layouts are typically used to arrange buttons in a panel. It will arrange buttons left to right until no more buttons fit on the same line. Each line is centered.
For example, the following picture shows an applet using the flow layout manager (its default layout manager) to position three buttons:
A flow layout lets each component assume its natural (preferred) size.
The following image illustrate the way the FlowLayout
layout child components.
Authors paling, ngrebenshikov
Class Fields
Instance Fields
Show inherited public instance fields | Hide inherited public instance fields
|
align
is the property that determines
how each row distributes empty space.
It can be one of the following values:
LEFT
RIGHT
CENTER
The flow layout manager allows a seperation of components with gaps. The horizontal gap will specify the space between components.
The flow layout manager allows a seperation of components with gaps. The vertical gap will specify the space between rows.
function new(?align:Int = 2, ?hgap:Int = 5, ?vgap:Int = 5, ?margin:Bool = true): Void
Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps.
The value of the alignment argument must be one of
FlowLayout.LEFT
, FlowLayout.RIGHT
,or FlowLayout.CENTER
.
align | the alignment value, default is LEFT |
hgap | the horizontal gap between components, default 5 |
vgap | the vertical gap between components, default 5 |
margin | whether or not the gap will margin around |