Class GroupLayout.ParallelGroup
- Enclosing class:
GroupLayout
A Group that lays out its elements on top of each
other. If a child element is smaller than the provided space it
is aligned based on the alignment of the child (if specified) or
on the alignment of the ParallelGroup.
See also
- #createParallelGroup()
-
Method Summary
Modifier and TypeMethodDescriptionadd(int pref) Adds a rigid gap.add(int min, int pref, int max) Adds a gap with the specified size.Adds the specified Component.Adds the specifiedComponent.add(int alignment, GroupLayout.Group group) Adds the specifiedGroupas a child of this group.Adds the specified Component.Adds the specifiedComponent.add(GroupLayout.Group group) Adds the specifiedGroup.
-
Method Details
-
add
Adds the specified
Group.Parameters
group: the Group to add
Returns
this Group
-
add
Adds the specified Component. If the Component's min/max are different from its pref than the component will be resizable.
Parameters
component: the Component to add
Returns
this
ParallelGroup -
add
Adds the specified
Component. Min, pref and max can be absolute values, or they can be one ofDEFAULT_SIZEorPREFERRED_SIZE. For example, the following:add(component, PREFERRED_SIZE, PREFERRED_SIZE, 1000);Forces a max of 1000, with the min and preferred equalling that of the preferred size of
component.Parameters
-
component: the Component to add -
min: the minimum size -
pref: the preferred size -
max: the maximum size
Returns
this
SequentialGroupThrows
IllegalArgumentException: @throws IllegalArgumentException if min, pref or max are not positive and not one of PREFERRED_SIZE or DEFAULT_SIZE.
-
-
add
Adds a rigid gap.
Parameters
pref: the size of the gap
Returns
this
ParallelGroupThrows
IllegalArgumentException: @throws IllegalArgumentException if min < 0 or pref < 0 or max < 0 or the following is not meant min <= pref <= max.
-
add
Adds a gap with the specified size.
Parameters
-
min: the minimum size of the gap -
pref: the preferred size of the gap -
max: the maximum size of the gap
Returns
this
ParallelGroupThrows
IllegalArgumentException: @throws IllegalArgumentException if min < 0 or pref < 0 or max < 0 or the following is not meant min <= pref <= max.
-
-
add
Adds the specified
Groupas a child of this group.Parameters
-
alignment: the alignment of the Group. -
group: the Group to add
Returns
this
ParallelGroupThrows
IllegalArgumentException: @throws IllegalArgumentException if alignment is not one ofLEADING,TRAILINGorCENTER
-
-
add
Adds the specified Component. If the Component's min/max are different from its pref than the component will be resizable.
Parameters
-
alignment: the alignment for the component -
component: the Component to add
Returns
this
GroupThrows
IllegalArgumentException: @throws IllegalArgumentException if alignment is not one ofLEADING,TRAILINGorCENTER
-
-
add
public GroupLayout.ParallelGroup add(int alignment, Component component, int min, int pref, int max) Adds the specified
Component. Min, pref and max can be absolute values, or they can be one ofDEFAULT_SIZEorPREFERRED_SIZE. For example, the following:add(component, PREFERRED_SIZE, PREFERRED_SIZE, 1000);Forces a max of 1000, with the min and preferred equalling that of the preferred size of
component.Parameters
-
alignment: the alignment for the component. -
component: the Component to add -
min: the minimum size -
pref: the preferred size -
max: the maximum size
Returns
this
GroupThrows
IllegalArgumentException: @throws IllegalArgumentException if min, pref or max are not positive and not one of PREFERRED_SIZE or DEFAULT_SIZE.
-
-