public class WrapLayout extends FlowLayout
| Modifier and Type | Field and Description |
|---|---|
private Dimension |
preferredLayoutSize |
| Constructor and Description |
|---|
WrapLayout()
Constructs a new
WrapLayout with a left
alignment and a default 5-unit horizontal and vertical gap. |
WrapLayout(int align)
Constructs a new
FlowLayout with 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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
addLayoutComponent, getAlignment, getAlignOnBaseline, getHgap, getVgap, removeLayoutComponent, setAlignment, setAlignOnBaseline, setHgap, setVgap, toStringprivate Dimension preferredLayoutSize
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 valuepublic 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 componentspublic Dimension preferredLayoutSize(Container target)
preferredLayoutSize in interface LayoutManagerpreferredLayoutSize in class FlowLayouttarget - the component which needs to be laid outpublic Dimension minimumLayoutSize(Container target)
minimumLayoutSize in interface LayoutManagerminimumLayoutSize in class FlowLayouttarget - the component which needs to be laid outprivate Dimension layoutSize(Container target, boolean preferred)
target - target to get layout size forpreferred - should preferred size be calculatedpublic void layoutContainer(Container target)
layoutContainer in interface LayoutManagerlayoutContainer in class FlowLayouttarget - the Container using this WrapLayoutprivate void addRow(Dimension dim, int rowWidth, int rowHeight)
Copyright © 2007–2017 Gephi Consortium. All rights reserved.