All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.FlowLayout
java.lang.Object
|
+----java.awt.FlowLayout
- public class FlowLayout
- extends Object
- implements LayoutManager, Serializable
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.
-
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 and a
default 5-unit horizontal and vertical gap.
-
FlowLayout(int)
- Constructs a new Flow Layout with the specified alignment and a
default 5-unit horizontal and vertical gap.
-
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.
-
getAlignment()
- Returns the alignment value for this layout, one of LEFT,
CENTER, or RIGHT.
-
getHgap()
- Returns the horizontal gap between components.
-
getVgap()
- Returns the vertical gap between components.
-
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.
-
setAlignment(int)
- Sets the alignment value for this layout.
-
setHgap(int)
- Sets the horizontal gap between components.
-
setVgap(int)
- Sets the vertical gap between components.
-
toString()
- Returns the String representation of this FlowLayout's values.
LEFT
Properties Public Constant
LEFT=int
- The left alignment variable.
CENTER
Properties Public Constant
CENTER=int
- The right alignment variable.
RIGHT
Properties Public Constant
RIGHT=int
- The right alignment variable.
FlowLayout
method FlowLayout() public
- Constructs a new Flow Layout with a centered alignment and a
default 5-unit horizontal and vertical gap.
FlowLayout
method FlowLayout(align=int) public
- Constructs a new Flow Layout with the specified alignment and a
default 5-unit horizontal and vertical gap.
- Parameters:
- align - the alignment value
FlowLayout
method FlowLayout(align=int, -
hgap=int, -
vgap=int) public
- 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
getAlignment
method getAlignment() returns int public
- Returns the alignment value for this layout, one of LEFT,
CENTER, or RIGHT.
setAlignment
method setAlignment(align=int) public
- Sets the alignment value for this layout.
- Parameters:
- align - the alignment value, one of LEFT, CENTER, or RIGHT.
getHgap
method getHgap() returns int public
- Returns the horizontal gap between components.
setHgap
method setHgap(hgap=int) public
- Sets the horizontal gap between components.
- Parameters:
- hgap - the horizontal gap between components
getVgap
method getVgap() returns int public
- Returns the vertical gap between components.
setVgap
method setVgap(vgap=int) public
- Sets the vertical gap between components.
- Parameters:
- vgap - the vertical gap between components
addLayoutComponent
method addLayoutComponent(name=String, -
comp=Component) public
- Adds the specified component to the layout. Not used by this class.
- Parameters:
- name - the name of the component
- comp - the the component to be added
removeLayoutComponent
method removeLayoutComponent(comp=Component) public
- Removes the specified component from the layout. Not used by
this class.
- Parameters:
- comp - the component to remove
preferredLayoutSize
method preferredLayoutSize(target=Container) returns Dimension public
- 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, minimumLayoutSize
minimumLayoutSize
method minimumLayoutSize(target=Container) returns Dimension public
- 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:
- preferredLayoutSize
layoutContainer
method layoutContainer(target=Container) public
- Lays out the container. This method will actually reshape the
components in the target in order to satisfy the constraints of
the BorderLayout object.
- Parameters:
- target - the specified component being laid out.
- See Also:
- Container
toString
method toString() returns String public
- Returns the String representation of this FlowLayout's values.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index