|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.FlowLayout
com.tecnick.jwtm.VFlowLayout
public class VFlowLayout
Title: VFlowLayout
Description: A Vertical Flow Layout extends FlowLayout. This class arranges components in a top-to-bottom flow. This layout lets each component assume its natural (preferred) size.
Field Summary | |
---|---|
static int |
BOTTOM
This value indicates that each column of components should be vertical aligned to the bottm. |
static int |
CENTER
This value indicates that each row of components should be centered. |
private int |
halign
align is the property that determines
how each row distributes empty space. |
private int |
hgap
The flow layout manager allows a seperation of components with gaps. |
static int |
LEFT
This value indicates that each row of components should be left-justified. |
static int |
MIDDLE
This value indicates that each column of components should be vertical aligned to the middle. |
private int |
orientation
orientation is the property that determines
the component orientation (LTR or RTL). |
static int |
RIGHT
This value indicates that each row of components should be right-justified. |
private static long |
serialVersionUID
serialVersionUID |
static int |
TOP
This value indicates that each column of components should be vertical aligned to the top. |
private int |
valign
valign is the property that determines
how each column distributes empty space. |
private int |
vgap
The flow layout manager allows a seperation of components with gaps. |
Fields inherited from class java.awt.FlowLayout |
---|
LEADING, TRAILING |
Constructor Summary | |
---|---|
VFlowLayout()
Constructs a new FlowLayout with a centered alignment and a
default 5-unit horizontal and vertical gap. |
|
VFlowLayout(int halign,
int valign)
Constructs a new FlowLayout with the specified
alignment and a default 5-unit horizontal and vertical gap. |
|
VFlowLayout(int halign,
int valign,
int hgap,
int vgap)
Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps. |
Method Summary | |
---|---|
int |
getHAlignment()
Gets the horizontal alignment for this layout. |
int |
getHgap()
Gets the horizontal gap between components. |
int |
getVAlignment()
Gets the verical alignment for this layout. |
int |
getVgap()
Gets the vertical gap between components. |
void |
layoutContainer(java.awt.Container target)
Lays out the container. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container target)
Returns the minimum dimensions needed to layout the visible components contained in the specified target container. |
private void |
moveComponents(java.awt.Container target,
int x,
int y,
int width,
int height,
int colStart,
int colEnd,
boolean ltr)
Centers the elements in the specified column, if there is any slack. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container target)
Returns the preferred dimensions for this layout given the visible components in the specified target container. |
void |
setHAlignment(int halign)
Sets the horizontal alignment for this layout. |
void |
setHgap(int hgap)
Sets the horizontal gap between components. |
void |
setorientation(int o)
Sets the component orientation. |
void |
setVAlignment(int valign)
Sets the vertical alignment for this layout. |
void |
setVgap(int vgap)
Sets the vertical gap between components. |
Methods inherited from class java.awt.FlowLayout |
---|
addLayoutComponent, getAlignment, removeLayoutComponent, setAlignment, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
public static final int LEFT
public static final int CENTER
public static final int RIGHT
public static final int TOP
public static final int MIDDLE
public static final int BOTTOM
private int halign
align
is the property that determines
how each row distributes empty space.
It can be one of the following values:
LEFT
RIGHT
CENTER
private int valign
valign
is the property that determines
how each column distributes empty space.
It can be one of the following values:
TOP
MIDDLE
BOTTOM
private int hgap
getHgap()
,
setHgap(int)
private int vgap
getHgap()
,
setHgap(int)
private int orientation
orientation
is the property that determines
the component orientation (LTR or RTL).
It can be one of the following values:
LEFT
(left-to-right)
RIGHT
(right-to-left)
Constructor Detail |
---|
public VFlowLayout()
FlowLayout
with a centered alignment and a
default 5-unit horizontal and vertical gap.
public VFlowLayout(int halign, int valign)
FlowLayout
with the specified
alignment and a default 5-unit horizontal and vertical gap.
The value of the alignment argument must be one of
FlowLayout.LEFT
, FlowLayout.RIGHT
,
or FlowLayout.CENTER
.
halign
- the horizontal alignment valuevalign
- the vertical alignment valuepublic VFlowLayout(int halign, int valign, int hgap, int vgap)
The value of the horizontal alignment argument must be one of
VFlowLayout.LEFT
, VFlowLayout.RIGHT
,
or VFlowLayout.CENTER
.
The value of the vertical alignment argument must be one of
VFlowLayout.TOP
,
VFlowLayout.MIDDLE
, VFlowLayout.BOTTOM
.
halign
- horizontal alignment valuevalign
- vertical alignment valuehgap
- the horizontal gap between componentsvgap
- the vertical gap between componentsMethod Detail |
---|
public int getVAlignment()
VFlowLayout.TOP
,
VFlowLayout.MIDDLE
, VFlowLayout.BOTTOM
,
public void setVAlignment(int valign)
VFlowLayout.TOP
,
VFlowLayout.MIDDLE
, VFlowLayout.BOTTOM
.
valign
- vertical alignmentpublic int getHAlignment()
VFlowLayout.LEFT
,
VFlowLayout.RIGHT
, VFlowLayout.CENTER
,
public void setHAlignment(int halign)
VFlowLayout.TOP
,
VFlowLayout.MIDDLE
, VFlowLayout.BOTTOM
,
halign
- vertical alignmentpublic void setorientation(int o)
VFlowLayout.LEFT
,
VFlowLayout.RIGHT
.
o
- orientationpublic int getHgap()
getHgap
in class java.awt.FlowLayout
public void setHgap(int hgap)
setHgap
in class java.awt.FlowLayout
hgap
- the horizontal gap between componentspublic int getVgap()
getVgap
in class java.awt.FlowLayout
public void setVgap(int vgap)
setVgap
in class java.awt.FlowLayout
vgap
- the vertical gap between componentspublic java.awt.Dimension preferredLayoutSize(java.awt.Container target)
preferredLayoutSize
in interface java.awt.LayoutManager
preferredLayoutSize
in class java.awt.FlowLayout
target
- the component which needs to be laid out
Container
,
minimumLayoutSize(java.awt.Container)
,
Container.getPreferredSize()
public java.awt.Dimension minimumLayoutSize(java.awt.Container target)
minimumLayoutSize
in interface java.awt.LayoutManager
minimumLayoutSize
in class java.awt.FlowLayout
target
- the component which needs to be laid out
preferredLayoutSize(java.awt.Container)
,
Container
,
Container.doLayout()
private void moveComponents(java.awt.Container target, int x, int y, int width, int height, int colStart, int colEnd, boolean ltr)
target
- the component which needs to be movedx
- the x coordinatey
- the y coordinatewidth
- the width dimensionsheight
- the height dimensionscolStart
- the beginning of the columncolEnd
- the the ending of the columnltr
- orientationpublic void layoutContainer(java.awt.Container target)
FlowLayout
object.
layoutContainer
in interface java.awt.LayoutManager
layoutContainer
in class java.awt.FlowLayout
target
- the specified component being laid outContainer
,
Container.doLayout()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |