org.apache.jorphan.gui.layout

## Class VerticalLayout

- java.lang.Object
- - org.apache.jorphan.gui.layout.VerticalLayout

- All Implemented Interfaces:
    java.awt.LayoutManager, java.io.Serializable

      public class VerticalLayout
      extends java.lang.Object
      implements java.awt.LayoutManager, java.io.Serializable

  A vertical layout manager similar to java.awt.FlowLayout. Like FlowLayout components do not expand to fill available space except when the horizontal alignment is `BOTH` in which case components are stretched horizontally. Unlike FlowLayout, components will not wrap to form another column if there isn't enough space vertically. VerticalLayout can optionally anchor components to the top or bottom of the display area or center them between the top and bottom. Revision date 04 April 1999
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `BOTH` The horizontal alignment constant that designates stretching the component horizontally.
    `static int` | `BOTTOM` The anchoring constant that designates anchoring to the bottom of the display area.
    `static int` | `CENTER` The horizontal alignment constant that designates centering.
    `static int` | `LEFT` The horizontal alignment constant that designates left justification.
    `static int` | `RIGHT` The horizontal alignment constant that designates right justification.
    `static int` | `TOP` The anchoring constant that designates anchoring to the top of the display area.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VerticalLayout()` Constructs an instance of VerticalLayout with a vertical vgap of 5 pixels, horizontal centering and anchored to the top of the display area.
    `VerticalLayout(int vgap)` Constructs a VerticalLayout instance with horizontal centering, anchored to the top with the specified vgap.
    `VerticalLayout(int vgap, int alignment)` Constructs a VerticalLayout instance anchored to the top with the specified vgap and horizontal alignment.
    `VerticalLayout(int vgap, int alignment, int anchor)` Constructs a VerticalLayout instance with the specified vgap, horizontal alignment and anchoring

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addLayoutComponent(java.lang.String name, java.awt.Component comp)` Not used by this class.
    `void` | `layoutContainer(java.awt.Container parent)` Lays out the container.
    `java.awt.Dimension` | `minimumLayoutSize(java.awt.Container parent)`
    `java.awt.Dimension` | `preferredLayoutSize(java.awt.Container parent)`
    `void` | `removeLayoutComponent(java.awt.Component comp)` Not used by this class.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### CENTER

          public static final int CENTER

      The horizontal alignment constant that designates centering. Also used to designate center anchoring.
      See Also:
        Constant Field Values

    - #### RIGHT

          public static final int RIGHT

      The horizontal alignment constant that designates right justification.
      See Also:
        Constant Field Values

    - #### LEFT

          public static final int LEFT

      The horizontal alignment constant that designates left justification.
      See Also:
        Constant Field Values

    - #### BOTH

          public static final int BOTH

      The horizontal alignment constant that designates stretching the component horizontally.
      See Also:
        Constant Field Values

    - #### TOP

          public static final int TOP

      The anchoring constant that designates anchoring to the top of the display area.
      See Also:
        Constant Field Values

    - #### BOTTOM

          public static final int BOTTOM

      The anchoring constant that designates anchoring to the bottom of the display area.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### VerticalLayout

          public VerticalLayout()

      Constructs an instance of VerticalLayout with a vertical vgap of 5 pixels, horizontal centering and anchored to the top of the display area.

    - #### VerticalLayout

          public VerticalLayout(int vgap)

      Constructs a VerticalLayout instance with horizontal centering, anchored to the top with the specified vgap.
      Parameters:
        `vgap` - an int value indicating the vertical seperation of the components

    - #### VerticalLayout

          public VerticalLayout(int vgap,
                                int alignment)

      Constructs a VerticalLayout instance anchored to the top with the specified vgap and horizontal alignment.
      Parameters:
        `vgap` - an int value indicating the vertical seperation of the components
        `alignment` - an int value which is one of `RIGHT, LEFT, CENTER, BOTH` for the horizontal alignment.

    - #### VerticalLayout

          public VerticalLayout(int vgap,
                                int alignment,
                                int anchor)

      Constructs a VerticalLayout instance with the specified vgap, horizontal alignment and anchoring
      Parameters:
        `vgap` - an int value indicating the vertical seperation of the components
        `alignment` - an int value which is one of `RIGHT, LEFT, CENTER, BOTH` for the horizontal alignment.
        `anchor` - an int value which is one of `TOP, BOTTOM, CENTER` indicating where the components are to appear if the display area exceeds the minimum necessary.

  - ### Method Detail

    - #### layoutContainer

          public void layoutContainer(java.awt.Container parent)

      Lays out the container.
      Specified by:
        `layoutContainer` in interface `java.awt.LayoutManager`

    - #### minimumLayoutSize

          public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)

      Specified by:
        `minimumLayoutSize` in interface `java.awt.LayoutManager`

    - #### preferredLayoutSize

          public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)

      Specified by:
        `preferredLayoutSize` in interface `java.awt.LayoutManager`

    - #### addLayoutComponent

          public void addLayoutComponent(java.lang.String name,
                                         java.awt.Component comp)

      Not used by this class.
      Specified by:
        `addLayoutComponent` in interface `java.awt.LayoutManager`

    - #### removeLayoutComponent

          public void removeLayoutComponent(java.awt.Component comp)

      Not used by this class.
      Specified by:
        `removeLayoutComponent` in interface `java.awt.LayoutManager`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.