net.sf.magicproject.ui.layout
Class FlowLayoutVertical

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

public class FlowLayoutVertical
extends java.lang.Object
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
FlowLayoutVertical()
          Constructs a new FlowLayout with a centered alignment and a default 5-unit horizontal and vertical gap.
FlowLayoutVertical(int preferredHeight)
          Constructs a new FlowLayout with a centered alignment and a default 5-unit horizontal and vertical gap.
FlowLayoutVertical(int hgap, int vgap, int preferredHeight)
          Creates a new flow layout manager with the indicated horizontal and vertical gaps.
 
Method Summary
 void addLayoutComponent(java.lang.String name, java.awt.Component comp)
           
 void layoutContainer(java.awt.Container target)
           
 java.awt.Dimension minimumLayoutSize(java.awt.Container target)
           
 java.awt.Dimension preferredLayoutSize(java.awt.Container target)
           
 void removeLayoutComponent(java.awt.Component comp)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowLayoutVertical

public FlowLayoutVertical(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.

FlowLayoutVertical

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


FlowLayoutVertical

public FlowLayoutVertical(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

addLayoutComponent

public void addLayoutComponent(java.lang.String name,
                               java.awt.Component comp)
Specified by:
addLayoutComponent in interface java.awt.LayoutManager

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component comp)
Specified by:
removeLayoutComponent in interface java.awt.LayoutManager

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container target)
Specified by:
preferredLayoutSize in interface java.awt.LayoutManager

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container target)
Specified by:
minimumLayoutSize in interface java.awt.LayoutManager

layoutContainer

public void layoutContainer(java.awt.Container target)
Specified by:
layoutContainer in interface java.awt.LayoutManager


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