All Packages Class Hierarchy This Package Previous Next Index

Class org.jfouffa.components.RowColumnLayout

java.lang.Object
   |
   +----org.jfouffa.components.RowColumnLayout

public class RowColumnLayout
extends Object
implements LayoutManager
RowColumnLayout is a layout that organizes components in column. The column can be horizontal or vertical.


Variable index

 o HORIZONTAL
 o VERTICAL

Constructor index

 o RowColumnLayout()
Constructs a new RowColumnLayout.
 o RowColumnLayout(int, int, int)
Constructs a new RowColumnLayout with the specified alignment and the specified horizontal and vertical gap between components.

Method index

 o addLayoutComponent(String, Component)
Adds the specified component with the specified name to the layout.
 o getAlignment()
Gets the alignment of this layout.
 o getHgap()
Gets the horizontal gap of this layout.
 o getVgap()
Gets the vertical gap of this layout.
 o layoutContainer(Container)
Lays out the container in the specified panel.
 o minimumLayoutSize(Container)
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
 o preferredLayoutSize(Container)
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
 o removeLayoutComponent(Component)
Removes the specified component from the layout.
 o setAlignment(int)
Sets the alignment of this layout to the specified align.
 o setHgap(int)
Sets to this layout the specified horizontal gap between components.
 o setVgap(int)
Sets to this layout the specified vertical gap between components.

Variables

 o HORIZONTAL
 public static final int HORIZONTAL
 o VERTICAL
 public static final int VERTICAL

Constructors

 o RowColumnLayout
 public RowColumnLayout()
Constructs a new RowColumnLayout.

 o RowColumnLayout
 public RowColumnLayout(int align,
                        int hgap,
                        int vgap)
Constructs a new RowColumnLayout with the specified alignment and the specified horizontal and vertical gap between components.

Parameters:
align - the alignment of this layout
hgap - the horizontal gap of this layout
vgap - the vertical gap of this layout

Methods

 o setAlignment
 public void setAlignment(int align)
Sets the alignment of this layout to the specified align.

Parameters:
align - the alignment of this layout
 o getAlignment
 public int getAlignment()
Gets the alignment of this layout.

 o setHgap
 public void setHgap(int hgap)
Sets to this layout the specified horizontal gap between components.

Parameters:
gap - the gap of this layout
 o getHgap
 public int getHgap()
Gets the horizontal gap of this layout.

 o setVgap
 public void setVgap(int vgap)
Sets to this layout the specified vertical gap between components.

Parameters:
gap - the gap of this layout
 o getVgap
 public int getVgap()
Gets the vertical gap of this layout.

 o addLayoutComponent
 public void addLayoutComponent(String name,
                                Component comp)
Adds the specified component with the specified name to the layout.

Parameters:
name - the component name
comp - the component to be added
 o removeLayoutComponent
 public void removeLayoutComponent(Component comp)
Removes the specified component from the layout.

Parameters:
comp - the component ot be removed
 o preferredLayoutSize
 public Dimension preferredLayoutSize(Container parent)
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.

Parameters:
parent - the component to be laid out
 o minimumLayoutSize
 public Dimension minimumLayoutSize(Container parent)
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.

Parameters:
parent - the component to be laid out
 o layoutContainer
 public void layoutContainer(Container parent)
Lays out the container in the specified panel.

Parameters:
parent - the component which needs to be laid out