|
Modifier and Type |
Method and Description |
|
addLayoutComponent |
void addLayoutComponent(java.lang.String name,
Component comp)
Adds the specified component to the layout.
public void addLayoutComponent(java.lang.String name,
Component comp)
-
Adds the specified component to the layout.
Not used by this class.
- Specified by:
addLayoutComponent in interface LayoutManager
- Parameters:
name - the name of the componentcomp - the component to be added
|
|
getAlignment |
int getAlignment()
Gets the alignment for this layout.
public int getAlignment()
-
Gets the alignment for this layout.
Possible values are FlowLayout.LEFT ,
FlowLayout.RIGHT , FlowLayout.CENTER ,
FlowLayout.LEADING ,
or FlowLayout.TRAILING .
- Returns:
- the alignment value for this layout
- Since:
- JDK1.1
- See Also:
setAlignment(int)
|
|
getAlignOnBaseline |
boolean getAlignOnBaseline()
Returns true if components are to be vertically aligned along
their baseline.
public boolean getAlignOnBaseline()
-
Returns true if components are to be vertically aligned along
their baseline. The default is false.
- Returns:
- true if components are to be vertically aligned along
their baseline
- Since:
- 1.6
|
|
getHgap |
int getHgap()
Gets the horizontal gap between components
and between the components and the borders
of the Container
public int getHgap()
-
Gets the horizontal gap between components
and between the components and the borders
of the Container
- Returns:
- the horizontal gap between components
and between the components and the borders
of the
Container - Since:
- JDK1.1
- See Also:
setHgap(int)
|
|
getVgap |
int getVgap()
Gets the vertical gap between components and
between the components and the borders of the
Container .
public int getVgap()
-
Gets the vertical gap between components and
between the components and the borders of the
Container .
- Returns:
- the vertical gap between components
and between the components and the borders
of the
Container - Since:
- JDK1.1
- See Also:
setVgap(int)
|
|
layoutContainer |
void layoutContainer(Container target)
Lays out the container.
public void layoutContainer( Container target)
-
Lays out the container. This method lets each
visible component take
its preferred size by reshaping the components in the
target container in order to satisfy the alignment of
this FlowLayout object.
- Specified by:
layoutContainer in interface LayoutManager
- Parameters:
target - the specified component being laid out- See Also:
Container ,
Container.doLayout()
|
|
minimumLayoutSize |
Dimension minimumLayoutSize(Container target)
Returns the minimum dimensions needed to layout the visible
components contained in the specified target container.
|
|
preferredLayoutSize |
Dimension preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the
visible components in the specified target container.
|
|
removeLayoutComponent |
void removeLayoutComponent(Component comp)
Removes the specified component from the layout.
|
|
setAlignment |
void setAlignment(int align)
Sets the alignment for this layout.
public void setAlignment(int align)
-
Sets the alignment for this layout.
Possible values are
FlowLayout.LEFT
FlowLayout.RIGHT
FlowLayout.CENTER
FlowLayout.LEADING
FlowLayout.TRAILING
- Parameters:
align - one of the alignment values shown above- Since:
- JDK1.1
- See Also:
getAlignment()
|
|
setAlignOnBaseline |
void setAlignOnBaseline(boolean alignOnBaseline)
Sets whether or not components should be vertically aligned along their
baseline.
public void setAlignOnBaseline(boolean alignOnBaseline)
-
Sets whether or not components should be vertically aligned along their
baseline. Components that do not have a baseline will be centered.
The default is false.
- Parameters:
alignOnBaseline - whether or not components should be
vertically aligned on their baseline- Since:
- 1.6
|
|
setHgap |
void setHgap(int hgap)
Sets the horizontal gap between components and
between the components and the borders of the
Container .
public void setHgap(int hgap)
-
Sets the horizontal gap between components and
between the components and the borders of the
Container .
- Parameters:
hgap - the horizontal gap between components
and between the components and the borders
of the Container - Since:
- JDK1.1
- See Also:
getHgap()
|
|
setVgap |
void setVgap(int vgap)
Sets the vertical gap between components and between
the components and the borders of the Container .
public void setVgap(int vgap)
-
Sets the vertical gap between components and between
the components and the borders of the Container .
- Parameters:
vgap - the vertical gap between components
and between the components and the borders
of the Container - Since:
- JDK1.1
- See Also:
getVgap()
|
|
toString |
java.lang.String toString()
Returns a string representation of this FlowLayout
object and its values.
public java.lang.String toString()
-
Returns a string representation of this FlowLayout
object and its values.
- Overrides:
toString in class java.lang.Object
- Returns:
- a string representation of this layout
|