Class FlowLayoutCorrectMinimumSize

java.lang.Object
java.awt.FlowLayout
info.monitorenter.gui.chart.layouts.FlowLayoutCorrectMinimumSize
All Implemented Interfaces:
LayoutManager, Serializable

public class FlowLayoutCorrectMinimumSize extends FlowLayout
A flow layout that claims the correct height of the component managed in case the available width is known. The standard FlowLayout does not claim the correct size but chooses the maximum width of all components to render which is worthless as the fact of flow breaks is not taken into account.

This class is inspired by the sun class FlowLayout with modifications to the methods preferredLayoutSize(Container) and minimumLayoutSize(Container).

Version:
$Revision: 1.13 $
Author:
Achim Westermann
See Also:
  • Constructor Details

    • FlowLayoutCorrectMinimumSize

      public FlowLayoutCorrectMinimumSize(int align)
      Constructs a new FlowLayout with the specified alignment and a default 5-unit horizontal and vertical gap. The value of the alignment argument must be one of FlowLayout.LEFT, FlowLayout.RIGHT, FlowLayout.CENTER, FlowLayout.LEADING, or FlowLayout.TRAILING.
      Parameters:
      align - the alignment value
    • FlowLayoutCorrectMinimumSize

      public FlowLayoutCorrectMinimumSize(int align, 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, FlowLayout.CENTER, FlowLayout.LEADING, or FlowLayout.TRAILING.

      Parameters:
      align - the alignment value
      hgap - the horizontal gap between components and between the components and the borders of the Container
      vgap - the vertical gap between components and between the components and the borders of the Container
  • Method Details