charva.awt
Class FlowLayout
- LayoutManager
public class FlowLayout
extends java.lang.Object
A concrete implementation of LayoutManager that lays out its
components left-to-right.
FlowLayout() - Default constructor.
|
FlowLayout(int align_, int hgap_, int vgap_) - Use this constructor when you want to set the alignment and the
horizontal and vertical gaps.
|
void | doLayout(Container container_) - Lay out the components according to the specified alignment, hgap
and vgap.
|
int | getAlignment() - Gets the alignment for this layout.
|
Dimension | minimumSize(Container container_) - Calculate the minimum-size rectangle that can enclose all the
components in the given container.
|
void | setAlignment(int align_) - Sets the alignment for this layout.
|
CENTER
public static final int CENTER
LEFT
public static final int LEFT
RIGHT
public static final int RIGHT
FlowLayout
public FlowLayout()
Default constructor. Sets alignment to CENTER, hgap to 1,
and vgap to 0.
FlowLayout
public FlowLayout(int align_,
int hgap_,
int vgap_)
Use this constructor when you want to set the alignment and the
horizontal and vertical gaps.
doLayout
public void doLayout(Container container_)
Lay out the components according to the specified alignment, hgap
and vgap.
This is called when the size of the container has already been
calculated.
It lays out the components in a row, one at a time, until it
determines that there is not enough space left in the row.
Then it moves to the next row. If there is not enough vertical
space in the container to lay out all of the components, it
removes the remaining components from the container; they don't
appear at all.
- doLayout in interface LayoutManager
getAlignment
public int getAlignment()
Gets the alignment for this layout.
setAlignment
public void setAlignment(int align_)
Sets the alignment for this layout. Allowable values are
FlowLayout.LEFT, FlowLayout.CENTER and FlowLayout.RIGHT.