Package com.kheops.ui.layout
Class VerticalFlowLayout
java.lang.Object
java.awt.FlowLayout
com.kheops.ui.layout.VerticalFlowLayout
- All Implemented Interfaces:
LayoutManager
,Serializable
VFlowLayout is similar to FlowLayout except it lays out components
vertically. Extends FlowLayout because it mimics much of the behavior of the
FlowLayout class, except vertically. An additional feature is that you can
specify a fill to edge flag, which causes the VerticalFlowLayout manager to
resize all components to expand to the column width Warning: This causes
problems when the main panel has less space that it needs and it seems to
prohibit multi-column output. Additionally there is a vertical fill flag,
which fills the last component to the remaining height of the container.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class java.awt.FlowLayout
LEADING, TRAILING
-
Constructor Summary
ConstructorDescriptionConstruct a new VerticalFlowLayout with a middle alignemnt, and the fill to edge flag set.VerticalFlowLayout
(boolean hfill, boolean vfill) Construct a new VerticalFlowLayout with a middle alignemnt.VerticalFlowLayout
(int align) Construct a new VerticalFlowLayout with a middle alignemnt.VerticalFlowLayout
(int align, boolean hfill, boolean vfill) Construct a new VerticalFlowLayout.VerticalFlowLayout
(int align, int hgap, int vgap, boolean hfill, boolean vfill) Construct a new VerticalFlowLayout. -
Method Summary
Modifier and TypeMethodDescriptionint
int
getHgap()
Gets the horizontal gap between components.boolean
boolean
int
getVgap()
Gets the vertical gap between components.void
layoutContainer
(Container target) Lays out the container.minimumLayoutSize
(Container target) Returns the minimum size needed to layout the target containerpreferredLayoutSize
(Container target) Returns the preferred dimensions given the components in the target container.void
setAlignment
(int HAlign, int VAlign) void
setHgap
(int hgap) Sets the horizontal gap between components.void
setHorizontalFill
(boolean hfill) void
setVerticalFill
(boolean vfill) void
setVgap
(int vgap) Sets the vertical gap between components.Methods inherited from class java.awt.FlowLayout
addLayoutComponent, getAlignOnBaseline, removeLayoutComponent, setAlignment, setAlignOnBaseline, toString
-
Field Details
-
TOP
public static final int TOP- See Also:
-
MIDDLE
public static final int MIDDLE- See Also:
-
BOTTOM
public static final int BOTTOM- See Also:
-
LEFT
public static final int LEFT- See Also:
-
CENTER
public static final int CENTER- See Also:
-
RIGHT
public static final int RIGHT- See Also:
-
-
Constructor Details
-
VerticalFlowLayout
public VerticalFlowLayout()Construct a new VerticalFlowLayout with a middle alignemnt, and the fill to edge flag set. -
VerticalFlowLayout
public VerticalFlowLayout(boolean hfill, boolean vfill) Construct a new VerticalFlowLayout with a middle alignemnt.- Parameters:
hfill
- the fill to edge flagvfill
- the fill to bottom flag
-
VerticalFlowLayout
public VerticalFlowLayout(int align) Construct a new VerticalFlowLayout with a middle alignemnt.- Parameters:
align
- the alignment value
-
VerticalFlowLayout
public VerticalFlowLayout(int align, boolean hfill, boolean vfill) Construct a new VerticalFlowLayout.- Parameters:
align
- the alignment valuehfill
- the hfill to edge flagvfill
- the fill to bottom flag
-
VerticalFlowLayout
public VerticalFlowLayout(int align, int hgap, int vgap, boolean hfill, boolean vfill) Construct a new VerticalFlowLayout.- Parameters:
align
- the alignment valuehgap
- the horizontal gap variablevgap
- the vertical gap variablehfill
- the fill to edge flagvfill
- the fill to bottom flag
-
-
Method Details
-
getHgap
public int getHgap()Gets the horizontal gap between components.- Overrides:
getHgap
in classFlowLayout
- Returns:
- the horizontal gap between components.
- Since:
- JDK1.1
- See Also:
-
setHgap
public void setHgap(int hgap) Sets the horizontal gap between components.- Overrides:
setHgap
in classFlowLayout
- Parameters:
hgap
- the horizontal gap
-
getVgap
public int getVgap()Gets the vertical gap between components.- Overrides:
getVgap
in classFlowLayout
-
setVgap
public void setVgap(int vgap) Sets the vertical gap between components.- Overrides:
setVgap
in classFlowLayout
- Parameters:
vgap
- the vertical gap
-
preferredLayoutSize
Returns the preferred dimensions given the components in the target container.- Specified by:
preferredLayoutSize
in interfaceLayoutManager
- Overrides:
preferredLayoutSize
in classFlowLayout
- Parameters:
target
- the component to lay out
-
minimumLayoutSize
Returns the minimum size needed to layout the target container- Specified by:
minimumLayoutSize
in interfaceLayoutManager
- Overrides:
minimumLayoutSize
in classFlowLayout
- Parameters:
target
- the component to lay out
-
setVerticalFill
public void setVerticalFill(boolean vfill) -
getVerticalFill
public boolean getVerticalFill() -
setHorizontalFill
public void setHorizontalFill(boolean hfill) -
getHorizontalFill
public boolean getHorizontalFill() -
setAlignment
public void setAlignment(int HAlign, int VAlign) -
getAlignment
public int getAlignment()- Overrides:
getAlignment
in classFlowLayout
-
layoutContainer
Lays out the container.- Specified by:
layoutContainer
in interfaceLayoutManager
- Overrides:
layoutContainer
in classFlowLayout
- Parameters:
target
- the container to lay out.
-