java.lang.Object | ||
↳ | javax.swing.GroupLayout.Group | |
↳ | javax.swing.GroupLayout.SequentialGroup |
A Group
that positions and sizes its elements
sequentially, one after another. This class has no public
constructor, use the createSequentialGroup
method
to create one.
In order to align a SequentialGroup
along the baseline
of a baseline aligned ParallelGroup
you need to specify
which of the elements of the SequentialGroup
is used to
determine the baseline. The element used to calculate the
baseline is specified using one of the add
methods that
take a boolean
. The last element added with a value of
true
for useAsBaseline
is used to calculate the
baseline.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a
Component to this Group
with the specified size. | |||||||||||
Adds a
Component to this Group
with the specified size.
| |||||||||||
Adds a
Component to this Group .
| |||||||||||
Adds a
Component to this Group . | |||||||||||
Adds an element representing the preferred gap between one
edge of the container and the next or previous
Component with the specified size. | |||||||||||
Adds an element representing the preferred gap between an edge
the container and components that touch the border of the
container.
| |||||||||||
Adds a rigid gap to this
Group .
| |||||||||||
Adds a gap to this
Group with the specified size.
| |||||||||||
Adds a
Group to this Group .
| |||||||||||
Adds a
Group to this Group . | |||||||||||
Adds an element representing the preferred gap between two
components.
| |||||||||||
Adds an element representing the preferred gap between the
nearest components.
| |||||||||||
Adds an element representing the preferred gap between the
nearest components.
| |||||||||||
Adds an element representing the preferred gap between two
components.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Adds a Component
to this Group
with the specified size.
useAsBaseline | whether the specified Component should
be used to calculate the baseline for this Group |
---|---|
component | the Component to add |
min | the minimum size or one of DEFAULT_SIZE or
PREFERRED_SIZE |
pref | the preferred size or one of DEFAULT_SIZE or
PREFERRED_SIZE |
max | the maximum size or one of DEFAULT_SIZE or
PREFERRED_SIZE |
Group
Adds a Component
to this Group
with the specified size.
component | the Component to add |
---|---|
min | the minimum size or one of DEFAULT_SIZE or
PREFERRED_SIZE |
pref | the preferred size or one of DEFAULT_SIZE or
PREFERRED_SIZE |
max | the maximum size or one of DEFAULT_SIZE or
PREFERRED_SIZE |
Group
Adds a Component
to this Group
.
component | the Component to add |
---|
Group
Adds a Component
to this Group
.
useAsBaseline | whether the specified Component should
be used to calculate the baseline for this Group |
---|---|
component | the Component to add |
Group
Adds an element representing the preferred gap between one
edge of the container and the next or previous Component
with the specified size. This has no
effect if the next or previous element is not a Component
and does not touch one edge of the parent
container.
pref | the preferred size; one of DEFAULT_SIZE or a
value >= 0 |
---|---|
max | the maximum size; one of DEFAULT_SIZE ,
PREFERRED_SIZE or a value >= 0 |
SequentialGroup
Adds an element representing the preferred gap between an edge the container and components that touch the border of the container. This has no effect if the added gap does not touch an edge of the parent container.
The element created to represent the gap is not resizable.
SequentialGroup
Adds a rigid gap to this Group
.
size | the size of the gap |
---|
Group
Adds a gap to this Group
with the specified size.
min | the minimum size of the gap |
---|---|
pref | the preferred size of the gap |
max | the maximum size of the gap |
Group
Adds a Group
to this Group
.
group | the Group to add |
---|
Group
Adds a Group
to this Group
.
useAsBaseline | whether the specified Group should
be used to calculate the baseline for this Group |
---|---|
group | the Group to add |
Group
Adds an element representing the preferred gap between two components. The element created to represent the gap is not resizable.
comp1 | the first component |
---|---|
comp2 | the second component |
type | the type of gap; one of the constants defined by
LayoutStyle |
SequentialGroup
IllegalArgumentException | if type , comp1 or
comp2 is null |
---|
Adds an element representing the preferred gap between the nearest components. During layout, neighboring components are found, and the minimum of this gap is set based on the size of the preferred gap between the neighboring components. If no neighboring components are found the minimum size is set to 0.
type | the type of gap; one of
LayoutStyle.ComponentPlacement.RELATED or
LayoutStyle.ComponentPlacement.UNRELATED |
---|---|
pref | the preferred size of the grap; one of
DEFAULT_SIZE or a value >= 0 |
max | the maximum size of the gap; one of
DEFAULT_SIZE , PREFERRED_SIZE
or a value >= 0 |
SequentialGroup
IllegalArgumentException | if type is not one of
LayoutStyle.ComponentPlacement.RELATED or
LayoutStyle.ComponentPlacement.UNRELATED |
---|
Adds an element representing the preferred gap between the
nearest components. During layout, neighboring
components are found, and the size of the added gap is set
based on the preferred gap between the components. If no
neighboring components are found the gap has a size of 0
.
The element created to represent the gap is not resizable.
type | the type of gap; one of
LayoutStyle.ComponentPlacement.RELATED or
LayoutStyle.ComponentPlacement.UNRELATED |
---|
SequentialGroup
IllegalArgumentException | if type is not one of
LayoutStyle.ComponentPlacement.RELATED or
LayoutStyle.ComponentPlacement.UNRELATED
|
---|
Adds an element representing the preferred gap between two components.
comp1 | the first component |
---|---|
comp2 | the second component |
type | the type of gap |
pref | the preferred size of the grap; one of
DEFAULT_SIZE or a value >= 0 |
max | the maximum size of the gap; one of
DEFAULT_SIZE , PREFERRED_SIZE
or a value >= 0 |
SequentialGroup
IllegalArgumentException | if type , comp1 or
comp2 is null |
---|