| Package | org.aswing |
| Class | public class FlowLayout |
| Inheritance | FlowLayout EmptyLayout |
| Subclasses | FlowWrapLayout |
| Property | Defined by | ||
|---|---|---|---|
align : intalign is the property that determines
how each row distributes empty space. | FlowLayout | ||
| hgap : int
The flow layout manager allows a seperation of
components with gaps.
| FlowLayout | ||
| margin : Boolean
whether or not the gap will margin around
| FlowLayout | ||
| vgap : int
The flow layout manager allows a seperation of
components with gaps.
| FlowLayout | ||
| Method | Defined by | ||
|---|---|---|---|
|
FlowLayout(align:int, hgap:int = 5, vgap:int = 5, margin:Boolean = true)
Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps. | FlowLayout | ||
![]() |
addLayoutComponent(comp:Component, constraints:Object):void
Do nothing
Adds the specified component to the layout, using the specified
constraint object.
| EmptyLayout | |
|
getAlignment():int
Gets the alignment for this layout.
| FlowLayout | ||
|
getHgap():int
Gets the horizontal gap between components.
| FlowLayout | ||
![]() |
getLayoutAlignmentX(target:Container):Number
return 0
| EmptyLayout | |
![]() |
getLayoutAlignmentY(target:Container):Number
return 0
| EmptyLayout | |
|
getVgap():int
Gets the vertical gap between components.
| FlowLayout | ||
![]() |
invalidateLayout(target:Container):void
do nothing
| EmptyLayout | |
|
isMargin():Boolean
Returns whether or not the gap will margin around.
| FlowLayout | ||
|
layoutContainer(target:Container):void
Lays out the container.
| FlowLayout | ||
![]() |
return IntDimension.createBigDimension();
| EmptyLayout | |
|
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.
| FlowLayout | ||
![]() |
removeLayoutComponent(comp:Component):void
Do nothing
Removes the specified component from the layout.
| EmptyLayout | |
|
setAlignment(align:int):void
Sets the alignment for this layout.
| FlowLayout | ||
|
setHgap(hgap:int):void
Sets the horizontal gap between components.
| FlowLayout | ||
|
setMargin(b:Boolean):void
Sets whether or not the gap will margin around.
| FlowLayout | ||
|
setVgap(vgap:int):void
Sets the vertical gap between components.
| FlowLayout | ||
|
toString():String
Returns a string representation of this
FlowLayout
object and its values. | FlowLayout | ||
| Constant | Defined by | ||
|---|---|---|---|
| CENTER : int = 0 [static]
This value indicates that each row of components
should be centered.
| FlowLayout | ||
| LEFT : int = 2 [static]
This value indicates that each row of components
should be left-justified.
| FlowLayout | ||
| RIGHT : int = 4 [static]
This value indicates that each row of components
should be right-justified.
| FlowLayout | ||
| align | property |
protected var align:int
align is the property that determines
how each row distributes empty space.
It can be one of the following values:
LEFT
RIGHT
CENTER
See also
| hgap | property |
protected var hgap:intThe flow layout manager allows a seperation of components with gaps. The horizontal gap will specify the space between components.
See also
| margin | property |
protected var margin:Booleanwhether or not the gap will margin around
| vgap | property |
protected var vgap:intThe flow layout manager allows a seperation of components with gaps. The vertical gap will specify the space between rows.
See also
| FlowLayout | () | constructor |
public function FlowLayout(align:int, hgap:int = 5, vgap:int = 5, margin:Boolean = true)
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 ofFlowLayout.LEFT, FlowLayout.RIGHT,or FlowLayout.CENTER.
Parameters
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
|
| getAlignment | () | method |
public function getAlignment():int
Gets the alignment for this layout.
Possible values are FlowLayout.LEFT,FlowLayout.RIGHT, FlowLayout.CENTER,
int — the alignment value for this layout
|
See also
| getHgap | () | method |
public function getHgap():intGets the horizontal gap between components.
Returnsint — the horizontal gap between components
|
See also
| getVgap | () | method |
public function getVgap():intGets the vertical gap between components.
Returnsint — the vertical gap between components
|
See also
| isMargin | () | method |
public function isMargin():BooleanReturns whether or not the gap will margin around.
ReturnsBoolean |
| layoutContainer | () | method |
public override function layoutContainer(target:Container):void
Lays out the container. This method lets each component take
its preferred size by reshaping the components in the
target container in order to satisfy the alignment of
this FlowLayout object.
target:Container — the specified component being laid out
|
See also
| minimumLayoutSize | () | method |
public override function minimumLayoutSize(target:Container):IntDimensionReturns the minimum dimensions needed to layout the visible components contained in the specified target container.
Parameterstarget:Container — the component which needs to be laid out
|
IntDimension —
the minimum dimensions to lay out the
subcomponents of the specified container
|
See also
| preferredLayoutSize | () | method |
public override function preferredLayoutSize(target:Container):IntDimensionReturns the preferred dimensions for this layout given the visible components in the specified target container.
Parameterstarget:Container — the component which needs to be laid out
|
IntDimension —
the preferred dimensions to lay out the
subcomponents of the specified container
|
See also
| setAlignment | () | method |
public function setAlignment(align:int):voidSets the alignment for this layout. Possible values are
FlowLayout.LEFT
FlowLayout.RIGHT
FlowLayout.CENTER
align:int — align one of the alignment values shown above
|
See also
| setHgap | () | method |
public function setHgap(hgap:int):voidSets the horizontal gap between components.
Parametershgap:int — the horizontal gap between components
|
See also
| setMargin | () | method |
public function setMargin(b:Boolean):voidSets whether or not the gap will margin around.
Parametersb:Boolean |
| setVgap | () | method |
public function setVgap(vgap:int):voidSets the vertical gap between components.
Parametersvgap:int — the vertical gap between components
|
See also
| toString | () | method |
public function toString():String
Returns a string representation of this FlowLayout
object and its values.
String — a string representation of this layout
|
| CENTER | constant |
public static const CENTER:int = 0This value indicates that each row of components should be centered.
| LEFT | constant |
public static const LEFT:int = 2This value indicates that each row of components should be left-justified.
| RIGHT | constant |
public static const RIGHT:int = 4This value indicates that each row of components should be right-justified.