Class java.awt.FlowLayout
All Packages This Package Previous Next
Class java.awt.FlowLayout
java.lang.Object
|
+----java.awt.FlowLayout
-
public class
FlowLayout
-
extends Object
-
implements LayoutManager
Flow layout is used to layout buttons in a panel. It will arrange
buttons left to right until no more buttons fit on the same line.
Each line is centered.
-
Version:
-
1.16, 09/08/95
-
Author:
-
Arthur van Hoff,
Sami Shaio
-
CENTER
-
The right alignment variable.
-
LEFT
-
The left alignment variable.
-
RIGHT
-
The right alignment variable.
-
FlowLayout()
-
Constructs a new Flow Layout with a centered alignment.
-
FlowLayout(int)
-
Constructs a new Flow Layout with the specified alignment.
-
FlowLayout(int, int, int)
-
Constructs a new Flow Layout with the specified alignment and gap
values.
-
addLayoutComponent(String, Component)
-
Adds the specified component to the layout.
-
layoutContainer(Container)
-
Lays out the container.
-
minimumLayoutSize(Container)
-
Returns the minimum dimensions needed to layout the components
contained in the specified target container.
-
preferredLayoutSize(Container)
-
Returns the preferred dimensions for this layout given the components
in the specified target container.
-
removeLayoutComponent(Component)
-
Removes the specified component from the layout.
-
toString()
-
Returns the String representation of this FlowLayout's values.
LEFT
public final static int LEFT
-
The left alignment variable.
CENTER
public final static int CENTER
-
The right alignment variable.
RIGHT
public final static int RIGHT
-
The right alignment variable.
FlowLayout
public FlowLayout()
-
Constructs a new Flow Layout with a centered alignment.
FlowLayout
public FlowLayout(int align)
-
Constructs a new Flow Layout with the specified alignment.
-
Parameters:
-
align
-
the alignment value
FlowLayout
public FlowLayout(int align,
int hgap,
int vgap)
-
Constructs a new Flow Layout with the specified alignment and gap
values.
-
Parameters:
-
align
-
the alignment value
-
hgap
-
the horizontal gap variable
-
vgap
-
the vertical gap variable
addLayoutComponent
public void addLayoutComponent(String name,
Component comp)
-
Adds the specified component to the layout. Does not apply.
-
Parameters:
-
name
-
the name of the component
-
comp
-
the the component to be added
removeLayoutComponent
public void removeLayoutComponent(Component comp)
-
Removes the specified component from the layout. Does not apply.
-
Parameters:
-
comp
-
the component to remove
preferredLayoutSize
public Dimension preferredLayoutSize(Container target)
-
Returns the preferred dimensions for this layout given the components
in the specified target container.
-
Parameters:
-
target
-
the component which needs to be laid out
-
See Also:
-
Container,
minimumSize
minimumLayoutSize
public Dimension minimumLayoutSize(Container target)
-
Returns the minimum dimensions needed to layout the components
contained in the specified target container.
-
Parameters:
-
target
-
the component which needs to be laid out
-
See Also:
-
preferredSize
layoutContainer
public void layoutContainer(Container target)
-
Lays out the container. This method will actually reshape the
components in target in order to satisfy the constraints of
the BorderLayout object.
-
Parameters:
-
target
-
the specified component being laid out.
-
See Also:
-
Container
toString
public String toString()
-
Returns the String representation of this FlowLayout's values.
-
Overrides:
-
toString in class Object
All Packages This Package Previous Next