API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt. FlowLayout View Source
Author(s)
Arthur van Hoff
Sami Shaio
Since
JDK1.0
Version
1.58, 11/17/05
Serial
Hierarchy
 Object
      FlowLayout
Implements
 LayoutManager
 Serializable
Subclasses
Description
public class FlowLayout
  A flow layout arranges components in a directional flow, much like lines of text in a paragraph.
See also:    ComponentOrientation
Constructors
public FlowLayout ()
Constructs a new FlowLayout with a centered alignment and a default 5-unit horizontal and vertical gap.
public FlowLayout (int align)
  Constructs a new FlowLayout with the specified alignment and a default 5-unit horizontal and vertical gap.
public FlowLayout (int align, int hgap, int vgap)
  Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps.
Methods
Hide/Show inherited methods
public void addLayoutComponent (String name, Component comp) [Specified in LayoutManager]
  Adds the specified component to the layout.
public int getAlignment ()
  Gets the alignment for this layout.
public boolean getAlignOnBaseline ()
  Returns true if components are to be vertically aligned along their baseline.
public int getHgap ()
  Gets the horizontal gap between components and between the components and the borders of the Container
public int getVgap ()
  Gets the vertical gap between components and between the components and the borders of the Container.
public void layoutContainer (Container target) [Specified in LayoutManager]
  Lays out the container.
public Dimension minimumLayoutSize (Container target) [Specified in LayoutManager]
  Returns the minimum dimensions needed to layout the visible components contained in the specified target container.
public Dimension preferredLayoutSize (Container target) [Specified in LayoutManager]
  Returns the preferred dimensions for this layout given the visible components in the specified target container.
public void removeLayoutComponent (Component comp) [Specified in LayoutManager]
  Removes the specified component from the layout.
public void setAlignment (int align)
  Sets the alignment for this layout.
public void setAlignOnBaseline (boolean alignOnBaseline)
  Sets whether or not components should be vertically aligned along their baseline.
public void setHgap (int hgap)
  Sets the horizontal gap between components and between the components and the borders of the Container.
public void setVgap (int vgap)
  Sets the vertical gap between components and between the components and the borders of the Container.
public String toString ()
  Returns a string representation of this FlowLayout object and its values.
Fields
Hide/Show inherited fields
pack-private int align
  align is the property that determines how each row distributes empty space.
publicfinalstatic int CENTER = "1"
This value indicates that each row of components should be centered.
pack-private int hgap
  The flow layout manager allows a seperation of components with gaps.
publicfinalstatic int LEADING = "3"
  This value indicates that each row of components should be justified to the leading edge of the container's orientation, for example, to the left in left-to-right orientations.
publicfinalstatic int LEFT = "0"
This value indicates that each row of components should be left-justified.
pack-private int newAlign
  newAlign is the property that determines how each row distributes empty space for the Java 2 platform, v1.2 and greater.
publicfinalstatic int RIGHT = "2"
This value indicates that each row of components should be right-justified.
publicfinalstatic int TRAILING = "4"
  This value indicates that each row of components should be justified to the trailing edge of the container's orientation, for example, to the right in left-to-right orientations.
pack-private int vgap
  The flow layout manager allows a seperation of components with gaps.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar