FIM.Util.GUI
Class FlowingLayout
java.lang.Object
|
+--java.awt.FlowLayout
|
+--FIM.Util.GUI.FlowingLayout
- All Implemented Interfaces:
- LayoutManager, Serializable
- public class FlowingLayout
- extends FlowLayout
A layout where the components are arranged from left to right in rows. Afer the first row
is full, the next row is started. Row height is the height of the tallest object in this row.
- Version:
- 1.0, 1.7.2000
- Author:
- Michael Sonntag
- See Also:
- Serialized Form
Constructor Summary |
FlowingLayout()
Constructs a new FlowingLayout with a centered alignment and a
default 5-unit horizontal and vertical gap. |
FlowingLayout(int align)
Constructs a new FlowingLayout with the specified alignment and a
default 5-unit horizontal and vertical gap.
|
FlowingLayout(int align,
int hgap,
int vgap)
Creates a new FlowingLayout manager with the indicated alignment
and the indicated horizontal and vertical gaps.
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FlowingLayout
public FlowingLayout()
- Constructs a new FlowingLayout with a centered alignment and a
default 5-unit horizontal and vertical gap.
FlowingLayout
public FlowingLayout(int align)
- Constructs a new FlowingLayout 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
. Alignment means, that the complete row is aligned in this way,
not the individual objects.
- Parameters:
align
- the alignment value
FlowingLayout
public FlowingLayout(int align,
int hgap,
int vgap)
- Creates a new FlowingLayout manager with the indicated alignment
and the indicated horizontal and vertical gaps.
The value of the alignment argument must be one of
FlowLayout.LEFT
, FlowLayout.RIGHT
,
or FlowLayout.CENTER
. Alignment means, that the complete row is aligned in this way,
- Parameters:
align
- the alignment valuehgap
- the horizontal gap between componentsvgap
- the vertical gap between components
preferredLayoutSize
public Dimension preferredLayoutSize(Container target)
- Returns the preferred dimensions for this layout given the components in the specified target container.
- Overrides:
preferredLayoutSize
in class FlowLayout
- Parameters:
target
- component which needs to be laid out- Returns:
- the preferred dimensions to lay out the subcomponents of the specified container
minimumLayoutSize
public Dimension minimumLayoutSize(Container target)
- Returns the minimum dimensions needed to layout the components contained in the specified target container.
Exactly the same as
preferredLayoutSize
, only the contained components are asked for
their minimum size instead of their preferred size.
- Overrides:
minimumLayoutSize
in class FlowLayout
- Parameters:
target
- the component which needs to be laid out- Returns:
- the minimum dimensions to lay out the subcomponents of the specified container
layoutContainer
public void layoutContainer(Container target)
- Lays out the container. This method lets each component take its preferred size by reshaping
the components in the target container in order to satisfy the constraints of this FlowingLayout object.
- Overrides:
layoutContainer
in class FlowLayout
- Parameters:
target
- the specified component being laid out
Submit a bug
Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.