net.sf.magicproject.ui.layout
Class FlowLayoutVertical2

java.lang.Object
  extended by net.sf.magicproject.ui.layout.FlowLayoutVertical
      extended by net.sf.magicproject.ui.layout.FlowLayoutVertical2
All Implemented Interfaces:
java.awt.LayoutManager

public class FlowLayoutVertical2
extends FlowLayoutVertical
implements java.awt.LayoutManager

A flow layout arranges components in a directional flow, much like lines of text in a paragraph. The flow direction is determined by the container's componentOrientation property and may be one of two values:

Flow layouts are typically used to arrange buttons in a panel. It arranges buttons horizontally until no more buttons fit on the same line.

A flow layout lets each component assume its natural (preferred) size.

Since:
0.80
Author:
Fabrice Daugan

Constructor Summary
FlowLayoutVertical2()
          Constructs a new FlowLayout with a centered alignment and a default 5-unit horizontal and vertical gap.
FlowLayoutVertical2(int preferredHeight)
          Constructs a new FlowLayout with a centered alignment and a default 5-unit horizontal and vertical gap.
FlowLayoutVertical2(int hgap, int vgap, int preferredHeight)
          Creates a new flow layout manager with the indicated horizontal and vertical gaps.
 
Method Summary
 void layoutContainer(java.awt.Container target)
          Lays out the container.
 
Methods inherited from class net.sf.magicproject.ui.layout.FlowLayoutVertical
addLayoutComponent, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.LayoutManager
addLayoutComponent, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent
 

Constructor Detail

FlowLayoutVertical2

public FlowLayoutVertical2()
Constructs a new FlowLayout with a centered alignment and a default 5-unit horizontal and vertical gap.


FlowLayoutVertical2

public FlowLayoutVertical2(int preferredHeight)
Constructs a new FlowLayout with a centered alignment and a default 5-unit horizontal and vertical gap.

Parameters:
preferredHeight - the preferred height of this layout.

FlowLayoutVertical2

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

Parameters:
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
preferredHeight - the preferred height of this layout.
Method Detail

layoutContainer

public void layoutContainer(java.awt.Container target)
Lays out the container. This method lets each visible component take its preferred size by reshaping the components in the target container in order to satisfy the alignment of this FlowLayout object.

Specified by:
layoutContainer in interface java.awt.LayoutManager
Overrides:
layoutContainer in class FlowLayoutVertical
Parameters:
target - the specified component being laid out
See Also:
Container, Container.doLayout()


Copyright © 2003-2007 Magic-Project. All Rights Reserved.