public class ListLayout extends AbstractLayout
| Modifier and Type | Field and Description |
|---|---|
protected int |
alignment |
static int |
BOTH |
protected Component |
center |
static int |
CENTER |
protected int |
index |
static int |
LEFT |
protected Vector |
panels |
static int |
RIGHT |
protected Vector |
tabs |
hgap, vgap| Constructor and Description |
|---|
ListLayout()
Constructs a ContextLayout with no gaps between components.
|
ListLayout(int alignment)
Constructs a ContextLayout with no gaps between components and the
specified alignment.
|
ListLayout(int hgap,
int vgap)
Constructs a ContextLayout with the specified gaps.
|
ListLayout(int hgap,
int vgap,
int alignment)
Constructs a ContextLayout with the specified gaps.
|
| Modifier and Type | Method and Description |
|---|---|
void |
layoutContainer(Container parent)
Lays out the specified container.
|
Dimension |
minimumLayoutSize(Container target)
Returns the minimum dimensions needed to layout the components contained
in the specified target container.
|
Dimension |
preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the components in
the specified target container.
|
addLayoutComponent, addLayoutComponent, getHgap, getLayoutAlignmentX, getLayoutAlignmentY, getVgap, invalidateLayout, maximumLayoutSize, removeLayoutComponent, setHgap, setVgap, toStringpublic static final int CENTER
public static final int LEFT
public static final int RIGHT
public static final int BOTH
protected Vector tabs
protected Vector panels
protected Component center
protected int index
protected int alignment
public ListLayout()
public ListLayout(int alignment)
alignment - The LEFT, RIGHT, CENTER or BOTH alignmentpublic ListLayout(int hgap,
int vgap)
hgap - The horizontal gapvgap - The vertical gappublic ListLayout(int hgap,
int vgap,
int alignment)
hgap - The horizontal gapvgap - The vertical gapalignment - The LEFT, RIGHT, CENTER or BOTH alignmentpublic Dimension minimumLayoutSize(Container target)
target - The Container on which to do the layoutpublic Dimension preferredLayoutSize(Container target)
target - The component which needs to be laid outpublic void layoutContainer(Container parent)
target - The component being laid outCopyright © 2021. All rights reserved.