Packageorg.aswing
Classpublic class FlowWrapLayout
InheritanceFlowWrapLayout Inheritance FlowLayout Inheritance EmptyLayout

FlowWrapLayout wrap layout is extended FlowLayout, the only different is that it has a prefer width, the prefer width means that when count the preffered size, it assume to let chilren arrange to a line when one reach the prefer width, then wrap next to next line. FlowLayout is different, when counting the preferred size, FlowLayout assumes all children should be arrange to one line.



Protected Properties
 PropertyDefined by
 Inheritedalign : int
align is the property that determines how each row distributes empty space.
FlowLayout
 Inheritedhgap : int
The flow layout manager allows a seperation of components with gaps.
FlowLayout
 Inheritedmargin : Boolean
whether or not the gap will margin around
FlowLayout
 Inheritedvgap : int
The flow layout manager allows a seperation of components with gaps.
FlowLayout
Public Methods
 MethodDefined by
  
FlowWrapLayout(preferWidth:int = 200, align:int, hgap:int = 5, vgap:int = 5, margin:Boolean = true)

Creates a new flow wrap layout manager with the indicated prefer width, alignment and the indicated horizontal and vertical gaps.

FlowWrapLayout
 Inherited
addLayoutComponent(comp:Component, constraints:Object):void
Do nothing Adds the specified component to the layout, using the specified constraint object.
EmptyLayout
 Inherited
Gets the alignment for this layout.
FlowLayout
 Inherited
getHgap():int
Gets the horizontal gap between components.
FlowLayout
 Inherited
return 0
EmptyLayout
 Inherited
return 0
EmptyLayout
  
Returns the prefer width for all should should arranged.
FlowWrapLayout
 Inherited
getVgap():int
Gets the vertical gap between components.
FlowLayout
 Inherited
do nothing
EmptyLayout
 Inherited
isMargin():Boolean
Returns whether or not the gap will margin around.
FlowLayout
 Inherited
Lays out the container.
FlowLayout
 Inherited
return IntDimension.createBigDimension();
EmptyLayout
 Inherited
Returns the minimum dimensions needed to layout the visible components contained in the specified target container.
FlowLayout
  
Returns the preferred dimensions for this layout given the visible components in the specified target container.
FlowWrapLayout
 Inherited
Do nothing Removes the specified component from the layout.
EmptyLayout
 Inherited
setAlignment(align:int):void
Sets the alignment for this layout.
FlowLayout
 Inherited
setHgap(hgap:int):void
Sets the horizontal gap between components.
FlowLayout
 Inherited
setMargin(b:Boolean):void
Sets whether or not the gap will margin around.
FlowLayout
  
setPreferWidth(preferWidth:int):void
Sets the prefer width for all should should arranged.
FlowWrapLayout
 Inherited
setVgap(vgap:int):void
Sets the vertical gap between components.
FlowLayout
  
toString():String
Returns a string representation of this FlowWrapLayout object and its values.
FlowWrapLayout
Public Constants
 ConstantDefined by
  CENTER : int = 0
[static] This value indicates that each row of components should be centered.
FlowWrapLayout
  LEFT : int = 2
[static] This value indicates that each row of components should be left-justified.
FlowWrapLayout
  RIGHT : int = 4
[static] This value indicates that each row of components should be right-justified.
FlowWrapLayout
Constructor detail
FlowWrapLayout()constructor
public function FlowWrapLayout(preferWidth:int = 200, align:int, hgap:int = 5, vgap:int = 5, margin:Boolean = true)

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. Parameters
preferWidth:int (default = 200) — preferWidth the width that when component need to wrap to second line
 
align:int — align the alignment value, default is LEFT
 
hgap:int (default = 5) — hgap the horizontal gap between components, default 5
 
vgap:int (default = 5) — vgap the vertical gap between components, default 5
 
margin:Boolean (default = true) — margin whether or not the gap will margin around
Method detail
getPreferWidth()method
public function getPreferWidth():int

Returns the prefer width for all should should arranged.

Returns
int — the prefer width for all should should arranged.
preferredLayoutSize()method 
public override function preferredLayoutSize(target:Container):IntDimension

Returns the preferred dimensions for this layout given the visible components in the specified target container.

Parameters
target:Container — the component which needs to be laid out

Returns
IntDimension — the preferred dimensions to lay out the subcomponents of the specified container

See also

setPreferWidth()method 
public function setPreferWidth(preferWidth:int):void

Sets the prefer width for all should should arranged.

Parameters
preferWidth:int — the prefer width for all should should arranged.
toString()method 
public override function toString():String

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

Returns
String — a string representation of this layout
Constant detail
CENTERconstant
public static const CENTER:int = 0

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

LEFTconstant 
public static const LEFT:int = 2

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

RIGHTconstant 
public static const RIGHT:int = 4

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