public class OrientableFlowLayout extends FlowLayout
| Modifier and Type | Field and Description |
|---|---|
static int |
BOTTOM
The bottom vertical alignment constant.
|
static int |
HORIZONTAL
The horizontal orientation constant.
|
(package private) int |
orientation |
static int |
TOP
The top vertical alignment constant.
|
(package private) int |
vAlign |
static int |
VERTICAL
The vertical orientation constant.
|
(package private) int |
vHGap |
(package private) int |
vVGap |
| Constructor and Description |
|---|
OrientableFlowLayout()
Constructs a new flow layout with a horizontal orientation and
centered alignment.
|
OrientableFlowLayout(int orientation)
Constructs a new flow layout with the specified orientation and
a centered alignment.
|
OrientableFlowLayout(int orientation,
int hAlign,
int vAlign)
Constructs a new flow layout with the specified orientation and
alignment.
|
OrientableFlowLayout(int orientation,
int hAlign,
int vAlign,
int hHGap,
int hVGap,
int vHGap,
int vVGap)
Constructs a new flow layout with the specified orientation,
alignment, and gap values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
layoutContainer(Container target)
Lays out the container.
|
Dimension |
minimumLayoutSize(Container target)
Returns the minimum dimensions needed to layout the components
contained in the specified target container.
|
void |
orientHorizontally()
Set the layout's current orientation to horizontal.
|
void |
orientVertically()
Set the layout's current orientation to vertical.
|
Dimension |
preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the
components in the specified target container.
|
String |
toString()
Returns the String representation of this layout's values.
|
addLayoutComponent, getAlignment, getAlignOnBaseline, getHgap, getVgap, removeLayoutComponent, setAlignment, setAlignOnBaseline, setHgap, setVgappublic static final int HORIZONTAL
public static final int VERTICAL
public static final int TOP
public static final int BOTTOM
int orientation
int vAlign
int vHGap
int vVGap
public OrientableFlowLayout()
public OrientableFlowLayout(int orientation)
orientation - the orientation, one of HORIZONTAL or VERTICAL.public OrientableFlowLayout(int orientation, int hAlign, int vAlign)
orientation - the orientation, one of HORIZONTAL or VERTICAL.hAlign - the horizontal alignment, one of LEFT, CENTER, or RIGHT.vAlign - the vertical alignment, one of TOP, CENTER, or BOTTOM.public OrientableFlowLayout(int orientation, int hAlign, int vAlign, int hHGap, int hVGap, int vHGap, int vVGap)
orientation - the orientation, one of HORIZONTAL or VERTICAL.hAlign - the horizontal alignment, one of LEFT, CENTER, or RIGHT.vAlign - the vertical alignment, one of TOP, CENTER, or BOTTOM.hHGap - the horizontal gap between components in HORIZONTAL.hVGap - the vertical gap between components in HORIZONTAL.vHGap - the horizontal gap between components in VERTICAL.vVGap - the vertical gap between components in VERTICAL.public void orientHorizontally()
public void orientVertically()
public Dimension preferredLayoutSize(Container target)
preferredLayoutSize in interface LayoutManagerpreferredLayoutSize in class FlowLayouttarget - the component which needs to be laid out.Container,
FlowLayout,
minimumLayoutSize(java.awt.Container)public Dimension minimumLayoutSize(Container target)
minimumLayoutSize in interface LayoutManagerminimumLayoutSize in class FlowLayouttarget - the component which needs to be laid out.#preferredLayoutSize.public void layoutContainer(Container target)
layoutContainer in interface LayoutManagerlayoutContainer in class FlowLayouttarget - the specified component being laid out.Container.public String toString()
toString in class FlowLayout