class org.aswing.FlowWrapLayout extends FlowLayout
FlowWrapLayout wrap layout is extended FlowLayout, the only different is that it has a preferred width, it means that when count the preffered size, it assume to let chilren arrange to a line when one reach the preferred width, then wrap to next line. FlowLayout is different, when counting the preferred size, FlowLayout assumes all children should be arrange to one line.
The following image illustrate the way the FlowWrapLayout
layout child components.
![](../../FlowWrapLayout.jpg)
Authors paling, ngrebenshikov
Class Fields
Instance Fields
![]() | Show inherited public instance fields | Hide inherited public instance fields
|
var preferredWidth:Int
A preffered width of a component. When the width of inside components widthes reachs the preferred width, then it wraps to next line and the process goes on.
function new(?preferredWidth:Int = 200, ?align:Int = 2, ?hgap:Int = 5, ?vgap:Int = 5, ?margin:Bool = true): Void
Creates a new flow wrap layout manager with the indicated prefer width, alignment and the indicated horizontal and vertical gaps.
The value of the alignment argument must be one of
FlowWrapLayout.LEFT
, FlowWrapLayout.RIGHT
,or FlowWrapLayout.CENTER
.
preferredWidth | the width that when component need to wrap to second line |
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 |