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
-
HORIZONTAL
-
-
VERTICAL
-
Constructor index
-
RowColumnLayout()
- Constructs a new RowColumnLayout.
-
RowColumnLayout(int, int, int)
- Constructs a new RowColumnLayout with the specified alignment and the
specified horizontal and vertical gap between components.
Method index
-
addLayoutComponent(String, Component)
- Adds the specified component with the specified name to the layout.
-
getAlignment()
- Gets the alignment of this layout.
-
getHgap()
- Gets the horizontal gap of this layout.
-
getVgap()
- Gets the vertical gap of this layout.
-
layoutContainer(Container)
- Lays out the container in the specified panel.
-
minimumLayoutSize(Container)
- Calculates the minimum size dimensions for the specified panel given the
components in the specified parent container.
-
preferredLayoutSize(Container)
- Calculates the preferred size dimensions for the specified panel given the
components in the specified parent container.
-
removeLayoutComponent(Component)
- Removes the specified component from the layout.
-
setAlignment(int)
- Sets the alignment of this layout to the specified align.
-
setHgap(int)
- Sets to this layout the specified horizontal gap between components.
-
setVgap(int)
- Sets to this layout the specified vertical gap between components.
Variables
HORIZONTAL
public static final int HORIZONTAL
VERTICAL
public static final int VERTICAL
Constructors
RowColumnLayout
public RowColumnLayout()
- Constructs a new RowColumnLayout.
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
setAlignment
public void setAlignment(int align)
- Sets the alignment of this layout to the specified align.
- Parameters:
- align - the alignment of this layout
getAlignment
public int getAlignment()
- Gets the alignment of this layout.
setHgap
public void setHgap(int hgap)
- Sets to this layout the specified horizontal gap between components.
- Parameters:
- gap - the gap of this layout
getHgap
public int getHgap()
- Gets the horizontal gap of this layout.
setVgap
public void setVgap(int vgap)
- Sets to this layout the specified vertical gap between components.
- Parameters:
- gap - the gap of this layout
getVgap
public int getVgap()
- Gets the vertical gap of this layout.
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
removeLayoutComponent
public void removeLayoutComponent(Component comp)
- Removes the specified component from the layout.
- Parameters:
- comp - the component ot be removed
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
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
layoutContainer
public void layoutContainer(Container parent)
- Lays out the container in the specified panel.
- Parameters:
- parent - the component which needs to be laid out