Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## charva.awt
Class FlowLayout

    java.lang.Object
      charva.awt.FlowLayout

All Implemented Interfaces:
  LayoutManager

public class FlowLayout
extends java.lang.Object
implements LayoutManager

A concrete implementation of LayoutManager that lays out its components left-to-right.

Field Summary
`static int` | `CENTER`
`static int` | `LEFT`
`static int` | `RIGHT`

Constructor Summary
`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.

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### LEFT

    public static final int LEFT

See Also:
  Constant Field Values

### CENTER

    public static final int CENTER

See Also:
  Constant Field Values

### RIGHT

    public static final int RIGHT

See Also:
  Constant Field Values

Constructor Detail

### 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.

Method Detail

### setAlignment

    public void setAlignment(int align_)

  Sets the alignment for this layout. Allowable values are FlowLayout.LEFT, FlowLayout.CENTER and FlowLayout.RIGHT.

### getAlignment

    public int getAlignment()

  Gets the alignment for this layout.

### minimumSize

    public Dimension minimumSize(Container container_)

  Calculate the minimum-size rectangle that can enclose all the components in the given container.

  Specified by:
    `minimumSize` in interface `LayoutManager`

### 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.

  Specified by:
    `doLayout` in interface `LayoutManager`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD