Class FormatLayout

java.lang.Object
org.jfree.layout.FormatLayout
All Implemented Interfaces:
LayoutManager, Serializable

public class FormatLayout extends Object implements LayoutManager, Serializable
A layout manager that spaces components over six columns in seven different formats.
Author:
David Gilbert
See Also:
  • Field Details

  • Constructor Details

    • FormatLayout

      public FormatLayout(int rowCount, int[] rowFormats)
      Constructs a new layout manager that can be used to create input forms. The layout manager works by arranging components in rows using six columns (some components will use more than one column).

      Any component can be added, but I think of them in terms of Labels, Components, and Buttons. The formats available are: C, LC, LCB, LCLC, LCLCB, LCBLC or LCBLCB.

      C 1 component in this row (spread across all six columns).
      LC 2 components, a label in the 1st column, and a component using the remaining 5 columns).
      LCB 3 components, a label in the 1st column, a component spread across the next 4, and a button in the last column.
      LCLC 4 components, a label in column 1, a component in 2-3, a label in 4 and a component in 5-6.
      LCLCB 5 components, a label in column 1, a component in 2-3, a label in 4, a component in 5 and a button in 6.
      LCBLC 5 components, a label in column 1, a component in 2, a button in 3, a label in 4, a component in 5-6.
      LCBLCB 6 components, one in each column.

      Columns 1 and 4 expand to accommodate the widest label, and 3 and 6 to accommodate the widest button.

      Each row will contain the number of components indicated by the format. Be sure to specify enough row formats to cover all the components you add to the layout.

      Parameters:
      rowCount - the number of rows.
      rowFormats - the row formats.
  • Method Details