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.


Authors paling, ngrebenshikov

Class Fields

static var CENTER:Int

This value indicates that each row of components should be centered.

static var LEFT:Int

This value indicates that each row of components should be left-justified.

static var RIGHT:Int

This value indicates that each row of components should be right-justified.

Instance Fields

Show inherited public instance fieldsHide inherited public instance fields

Inherited from FlowLayout

var align:Int
var hgap:Int
var margin:Bool
var vgap:Int
function toString():String

Inherited from EmptyLayout

function addLayoutComponent(comp:Component, constraints:Dynamic):Void
function getLayoutAlignmentX(target:Container):Float
function getLayoutAlignmentY(target:Container):Float
function invalidateLayout(target:Container):Void
function layoutContainer(target:Container):Void
function maximumLayoutSize(target:Container):IntDimension
function minimumLayoutSize(target:Container):IntDimension
function preferredLayoutSize(target:Container):IntDimension
function removeLayoutComponent(comp:Component):Void

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

function toString(): String

Returns a string representation of this FlowWrapLayout object and its values.

returns

a string representation of this layout