Package org.apache.jorphan.gui.layout
Class VerticalLayout
-
- All Implemented Interfaces:
-
java.awt.LayoutManager,java.io.Serializable
public class VerticalLayout implements LayoutManager, Serializable
A vertical layout manager similar to java.awt.FlowLayout. Like FlowLayout components do not expand to fill available space except when the horizontal alignment is
BOTHin which case components are stretched horizontally. Unlike FlowLayout, components will not wrap to form another column if there isn't enough space vertically. VerticalLayout can optionally anchor components to the top or bottom of the display area or center them between the top and bottom. Revision date 04 April 1999
-
-
Constructor Summary
Constructors Constructor Description VerticalLayout()Constructs an instance of VerticalLayout with a vertical vgap of 5 pixels, horizontal centering and anchored to the top of the display area. VerticalLayout(int vgap)Constructs a VerticalLayout instance with horizontal centering, anchored to the top with the specified vgap. VerticalLayout(int vgap, int alignment)Constructs a VerticalLayout instance anchored to the top with the specified vgap and horizontal alignment. VerticalLayout(int vgap, int alignment, int anchor)Constructs a VerticalLayout instance with the specified vgap, horizontal alignment and anchoring
-
Method Summary
Modifier and Type Method Description voidlayoutContainer(Container parent)Lays out the container. DimensionminimumLayoutSize(Container parent)DimensionpreferredLayoutSize(Container parent)voidaddLayoutComponent(String name, Component comp)Not used by this class. voidremoveLayoutComponent(Component comp)Not used by this class. StringtoString()-
-
Constructor Detail
-
VerticalLayout
VerticalLayout()
Constructs an instance of VerticalLayout with a vertical vgap of 5 pixels, horizontal centering and anchored to the top of the display area.
-
VerticalLayout
VerticalLayout(int vgap)
Constructs a VerticalLayout instance with horizontal centering, anchored to the top with the specified vgap.- Parameters:
vgap- an int value indicating the vertical separation of the components
-
VerticalLayout
VerticalLayout(int vgap, int alignment)
Constructs a VerticalLayout instance anchored to the top with the specified vgap and horizontal alignment.- Parameters:
vgap- an int value indicating the vertical separation of the componentsalignment- an int value which is one ofRIGHT, LEFT, CENTER, BOTHfor the horizontal alignment.
-
VerticalLayout
VerticalLayout(int vgap, int alignment, int anchor)
Constructs a VerticalLayout instance with the specified vgap, horizontal alignment and anchoring- Parameters:
vgap- an int value indicating the vertical separation of the componentsalignment- an int value which is one ofRIGHT, LEFT, CENTER, BOTHfor the horizontal alignment.anchor- an int value which is one ofTOP, BOTTOM, CENTERindicating where the components are to appear if the display area exceeds the minimum necessary.
-
-
Method Detail
-
layoutContainer
void layoutContainer(Container parent)
Lays out the container.
-
minimumLayoutSize
Dimension minimumLayoutSize(Container parent)
-
preferredLayoutSize
Dimension preferredLayoutSize(Container parent)
-
addLayoutComponent
void addLayoutComponent(String name, Component comp)
Not used by this class.
-
removeLayoutComponent
void removeLayoutComponent(Component comp)
Not used by this class.
-
-
-
-