Package com.kheops.ui.layout
Class WrapLayout
java.lang.Object
java.awt.FlowLayout
com.kheops.ui.layout.WrapLayout
- All Implemented Interfaces:
- LayoutManager,- Serializable
FlowLayout subclass that fully supports wrapping of components.
- See Also:
- 
Field Summary
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs a newWrapLayoutwith a left alignment and a default 5-unit horizontal and vertical gap.WrapLayout(int align) Constructs a newFlowLayoutwith the specified alignment and a default 5-unit horizontal and vertical gap.WrapLayout(int align, int hgap, int vgap) Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps.
- 
Method SummaryModifier and TypeMethodDescriptionvoidlayoutContainer(Container target) Lays out the container.minimumLayoutSize(Container target) Returns the minimum dimensions needed to layout the visible components contained in the specified target container.preferredLayoutSize(Container target) Returns the preferred dimensions for this layout given the visible components in the specified target container.Methods inherited from class java.awt.FlowLayoutaddLayoutComponent, getAlignment, getAlignOnBaseline, getHgap, getVgap, removeLayoutComponent, setAlignment, setAlignOnBaseline, setHgap, setVgap, toString
- 
Constructor Details- 
WrapLayoutpublic WrapLayout()Constructs a newWrapLayoutwith a left alignment and a default 5-unit horizontal and vertical gap.
- 
WrapLayoutpublic WrapLayout(int align) Constructs a newFlowLayoutwith the specified alignment and a default 5-unit horizontal and vertical gap. The value of the alignment argument must be one ofWrapLayout,WrapLayout, orWrapLayout.- Parameters:
- align- the alignment value
 
- 
WrapLayoutpublic WrapLayout(int align, 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 WrapLayout,WrapLayout, orWrapLayout.- Parameters:
- align- the alignment value
- hgap- the horizontal gap between components
- vgap- the vertical gap between components
 
 
- 
- 
Method Details- 
preferredLayoutSizeReturns the preferred dimensions for this layout given the visible components in the specified target container.- Specified by:
- preferredLayoutSizein interface- LayoutManager
- Overrides:
- preferredLayoutSizein class- FlowLayout
- Parameters:
- target- the component which needs to be laid out
- Returns:
- the preferred dimensions to lay out the subcomponents of the specified container
 
- 
minimumLayoutSizeReturns the minimum dimensions needed to layout the visible components contained in the specified target container.- Specified by:
- minimumLayoutSizein interface- LayoutManager
- Overrides:
- minimumLayoutSizein class- FlowLayout
- Parameters:
- target- the component which needs to be laid out
- Returns:
- the minimum dimensions to lay out the subcomponents of the specified container
 
- 
layoutContainerLays 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 alignment of thisWrapLayoutobject.- Specified by:
- layoutContainerin interface- LayoutManager
- Overrides:
- layoutContainerin class- FlowLayout
- Parameters:
- target- the specified component being laid out
 
 
-