Package com.portal.pfc.ui
Class ColumnFlowLayout
java.lang.Object
com.portal.pfc.ui.ColumnFlowLayout
- All Implemented Interfaces:
LayoutManager
,Serializable
Simlar to flow layout, but lays out components top to bottom, not
left to right.
- Version:
- %version: 1 % %date_modified: Thu Jun 10 18:47:50 1999 %
- Author:
- larrylf
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new Flow Layout with a centered alignment and a default 5-unit horizontal and vertical gap.ColumnFlowLayout
(int hgap, int vgap) Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLayoutComponent
(String name, Component comp) Adds the specified component to the layout.int
getHgap()
Gets the horizontal gap between components.int
getVgap()
Gets the vertical gap between components.void
layoutContainer
(Container target) Lays out the container.minimumLayoutSize
(Container target) Returns the minimum dimensions needed to layout the components contained in the specified target container.preferredLayoutSize
(Container target) Returns the preferred dimensions for this layout given the components in the specified target container.void
Removes the specified component from the layout.void
setHgap
(int hgap) Sets the horizontal gap between components.void
setVgap
(int vgap) Sets the vertical gap between components.toString()
Returns a string representation of thisFlowLayout
object and its values.
-
Constructor Details
-
ColumnFlowLayout
public ColumnFlowLayout()Constructs a new Flow Layout with a centered alignment and a default 5-unit horizontal and vertical gap. -
ColumnFlowLayout
public ColumnFlowLayout(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
, orFlowLayout.CENTER
.- Parameters:
hgap
- the horizontal gap between components.vgap
- the vertical gap between components.
-
-
Method Details
-
getHgap
public int getHgap()Gets the horizontal gap between components.- Returns:
- the horizontal gap between components.
-
setHgap
public void setHgap(int hgap) Sets the horizontal gap between components.- Parameters:
hgap
- the horizontal gap between components
-
getVgap
public int getVgap()Gets the vertical gap between components.- Returns:
- the vertical gap between components.
-
setVgap
public void setVgap(int vgap) Sets the vertical gap between components.- Parameters:
vgap
- the vertical gap between components
-
addLayoutComponent
Adds the specified component to the layout. Not used by this class.- Specified by:
addLayoutComponent
in interfaceLayoutManager
- Parameters:
name
- the name of the componentcomp
- the component to be added
-
removeLayoutComponent
Removes the specified component from the layout. Not used by this class.- Specified by:
removeLayoutComponent
in interfaceLayoutManager
- Parameters:
comp
- the component to remove
-
preferredLayoutSize
Returns the preferred dimensions for this layout given the components in the specified target container.- Specified by:
preferredLayoutSize
in interfaceLayoutManager
- Parameters:
target
- the component which needs to be laid out- Returns:
- the preferred dimensions to lay out the subcomponents of the specified container.
-
minimumLayoutSize
Returns the minimum dimensions needed to layout the components contained in the specified target container.- Specified by:
minimumLayoutSize
in interfaceLayoutManager
- Parameters:
target
- the component which needs to be laid out- Returns:
- the minimum dimensions to lay out the subcomponents of the specified container.
-
layoutContainer
Lays out the container. This method lets each component take its preferred size by reshaping the components in the target container in order to satisfy the constraints of thisColumnFlowLayout
object.- Specified by:
layoutContainer
in interfaceLayoutManager
- Parameters:
target
- the specified component being laid out.
-
toString
Returns a string representation of thisFlowLayout
object and its values.
-