Package PamView.panel
Class VerticalLayout
java.lang.Object
PamView.panel.VerticalLayout
- All Implemented Interfaces:
 LayoutManager
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 
BOTH
 in 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 12th July 2001- Author:
 - Colin Mummery e-mail: colin_mummery@yahoo.com Homepage:www.kagi.com/equitysoft - Based on 'FlexLayout' in Java class libraries Vol 2 Chan/Lee Addison-Wesley 1998
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe horizontal alignment constant that designates stretching the component horizontally.static final intThe anchoring constant that designates anchoring to the bottom of the display areastatic final intThe horizontal alignment constant that designates centering.static final intThe horizontal alignment constant that designates left justification.static final intThe horizontal alignment constant that designates right justification.static final intThe anchoring constant that designates anchoring to the top of the display area - 
Constructor Summary
ConstructorsConstructorDescriptionConstructs 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 vgapVerticalLayout(int vgap, int alignment) Constructs a VerticalLayout instance anchored to the top with the specified vgap and horizontal alignmentVerticalLayout(int vgap, int alignment, int anchor) Constructs a VerticalLayout instance with the specified vgap, horizontal alignment and anchoring - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayoutComponent(String name, Component comp) Not used by this classvoidlayoutContainer(Container parent) Lays out the container.minimumLayoutSize(Container parent) preferredLayoutSize(Container parent) voidNot used by this classtoString() 
- 
Field Details
- 
CENTER
public static final int CENTERThe horizontal alignment constant that designates centering. Also used to designate center anchoring.- See Also:
 
 - 
RIGHT
public static final int RIGHTThe horizontal alignment constant that designates right justification.- See Also:
 
 - 
LEFT
public static final int LEFTThe horizontal alignment constant that designates left justification.- See Also:
 
 - 
BOTH
public static final int BOTHThe horizontal alignment constant that designates stretching the component horizontally.- See Also:
 
 - 
TOP
public static final int TOPThe anchoring constant that designates anchoring to the top of the display area- See Also:
 
 - 
BOTTOM
public static final int BOTTOMThe anchoring constant that designates anchoring to the bottom of the display area- See Also:
 
 
 - 
 - 
Constructor Details
- 
VerticalLayout
public 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
public 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 seperation of the components
 - 
VerticalLayout
public 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 seperation of the componentsalignment- An int value which is one ofRIGHT, LEFT, CENTER, BOTHfor the horizontal alignment.
 - 
VerticalLayout
public 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 seperation 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 Details
- 
layoutContainer
Lays out the container.- Specified by:
 layoutContainerin interfaceLayoutManager
 - 
minimumLayoutSize
- Specified by:
 minimumLayoutSizein interfaceLayoutManager
 - 
preferredLayoutSize
- Specified by:
 preferredLayoutSizein interfaceLayoutManager
 - 
addLayoutComponent
Not used by this class- Specified by:
 addLayoutComponentin interfaceLayoutManager
 - 
removeLayoutComponent
Not used by this class- Specified by:
 removeLayoutComponentin interfaceLayoutManager
 - 
toString
 
 -