|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.awt.FlowLayout
com.wordpress.tipsforjava.swing.WrapLayout
public class WrapLayout extends FlowLayout
FlowLayout subclass that fully supports wrapping of components. http://tips4java.wordpress.com/2008/11/06/wrap-layout/
| Field Summary | |
|---|---|
private Dimension |
preferredLayoutSize
|
| Fields inherited from class FlowLayout | |
|---|---|
| LEFT, CENTER, RIGHT, LEADING, TRAILING |
| Constructor Summary | |
WrapLayout()
Constructs a new |
|
WrapLayout(int align)
Constructs a new |
|
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 Summary | |
|---|---|
private void
|
addRow(Dimension dim, int rowWidth, int rowHeight)
|
void
|
layoutContainer(Container target)
Layout the components in the Container using the layout logic of the parent FlowLayout class. |
private Dimension
|
layoutSize(Container target, boolean preferred)
Returns the minimum or preferred dimension needed to layout the target container. |
Dimension
|
minimumLayoutSize(Container target)
Returns the minimum dimensions needed to layout the visible components contained in the specified target container. |
Dimension
|
preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the visible components in the specified target container. |
| Methods inherited from class FlowLayout | |
|---|---|
| toString, removeLayoutComponent, addLayoutComponent, layoutContainer, preferredLayoutSize, minimumLayoutSize, getAlignment, setAlignment, getHgap, setHgap, getVgap, setVgap, setAlignOnBaseline, getAlignOnBaseline, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
private Dimension preferredLayoutSize
| Constructor Detail |
|---|
public WrapLayout()
WrapLayout with a left
alignment and a default 5-unit horizontal and vertical gap.
public WrapLayout(int align)
FlowLayout with the specified
alignment and a default 5-unit horizontal and vertical gap.
The value of the alignment argument must be one of
WrapLayout, WrapLayout,
or WrapLayout.
align - the alignment value
public WrapLayout(int align, int hgap, int vgap)
The value of the alignment argument must be one of
WrapLayout, WrapLayout,
or WrapLayout.
align - the alignment valuehgap - the horizontal gap between componentsvgap - the vertical gap between components
| Method Detail |
|---|
private void addRow(Dimension dim, int rowWidth, int rowHeight)
de public public void layoutContainer(Container target)
target - the Container using this WrapLayout
private Dimension layoutSize(Container target, boolean preferred)
target - target to get layout size forpreferred - should preferred size be calculated
de public public Dimension minimumLayoutSize(Container target)
target - the component which needs to be laid out
de public public Dimension preferredLayoutSize(Container target)
target - the component which needs to be laid out
Groovy Documentation