Class ColumnFlowLayout

java.lang.Object
com.portal.pfc.ui.ColumnFlowLayout
All Implemented Interfaces:
LayoutManager, Serializable

public class ColumnFlowLayout extends Object implements LayoutManager, Serializable
Simlar to flow layout, but lays out components top to bottom, not left to right.
Version:
%version: 1 % %date_modified: Thu Jun 10 18:47:50 1999 %
Author:
larrylf
See Also:
  • Constructor Details

    • ColumnFlowLayout

      public ColumnFlowLayout()
      Constructs a new Flow Layout with a centered alignment and a default 5-unit horizontal and vertical gap.
    • ColumnFlowLayout

      public ColumnFlowLayout(int hgap, int vgap)
      Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps.

      The value of the alignment argument must be one of FlowLayout.LEFT, FlowLayout.RIGHT, or FlowLayout.CENTER.

      Parameters:
      hgap - the horizontal gap between components.
      vgap - the vertical gap between components.
  • Method Details

    • getHgap

      public int getHgap()
      Gets the horizontal gap between components.
      Returns:
      the horizontal gap between components.
    • setHgap

      public void setHgap(int hgap)
      Sets the horizontal gap between components.
      Parameters:
      hgap - the horizontal gap between components
    • getVgap

      public int getVgap()
      Gets the vertical gap between components.
      Returns:
      the vertical gap between components.
    • setVgap

      public void setVgap(int vgap)
      Sets the vertical gap between components.
      Parameters:
      vgap - the vertical gap between components
    • addLayoutComponent

      public void addLayoutComponent(String name, Component comp)
      Adds the specified component to the layout. Not used by this class.
      Specified by:
      addLayoutComponent in interface LayoutManager
      Parameters:
      name - the name of the component
      comp - the component to be added
    • removeLayoutComponent

      public void removeLayoutComponent(Component comp)
      Removes the specified component from the layout. Not used by this class.
      Specified by:
      removeLayoutComponent in interface LayoutManager
      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.
      Specified by:
      preferredLayoutSize in interface LayoutManager
      Parameters:
      target - the component which needs to be laid out
      Returns:
      the preferred dimensions to lay out the subcomponents of the specified container.
    • minimumLayoutSize

      public Dimension minimumLayoutSize(Container target)
      Returns the minimum dimensions needed to layout the components contained in the specified target container.
      Specified by:
      minimumLayoutSize in interface LayoutManager
      Parameters:
      target - the component which needs to be laid out
      Returns:
      the minimum dimensions to lay out the subcomponents of the specified container.
    • layoutContainer

      public void layoutContainer(Container target)
      Lays out the container. This method lets each component take its preferred size by reshaping the components in the target container in order to satisfy the constraints of this ColumnFlowLayout object.
      Specified by:
      layoutContainer in interface LayoutManager
      Parameters:
      target - the specified component being laid out.
    • toString

      public String toString()
      Returns a string representation of this FlowLayout object and its values.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this layout.
      Since:
      JDK1.0