public class GroupLayout.ParallelGroup

  1. Object
  2. GroupLayout.Group
  3. GroupLayout.ParallelGroup
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()

Methods

public GroupLayout.ParallelGroup add(GroupLayout.Group group)Adds the specified Group.
public GroupLayout.ParallelGroup add(Component component)Adds the specified Component.
public GroupLayout.ParallelGroup add(Component component, int min, int pref, int max)Adds the specified Component.
public GroupLayout.ParallelGroup add(int pref)Adds a rigid gap.
public GroupLayout.ParallelGroup add(int min, int pref, int max)Adds a gap with the specified size.
public GroupLayout.ParallelGroup add(int alignment, GroupLayout.Group group)Adds the specified Group as a child of this group.
public GroupLayout.ParallelGroup add(int alignment, Component component)Adds the specified Component.
public GroupLayout.ParallelGroup add(int alignment, Component component, int min, int pref, int max)Adds the specified Component.

Inherited methods

Method details

add

public GroupLayout.ParallelGroup add(GroupLayout.Group group)
Adds the specified Group.

Parameters

group GroupLayout.Group
the Group to add

Returns

this Group

add

public GroupLayout.ParallelGroup add(Component component)
Adds the specified Component. If the Component’s min/max are different from its pref than the component will be resizable.

Parameters

component Component
the Component to add

Returns

this ParallelGroup

add

public GroupLayout.ParallelGroup add(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 of DEFAULT_SIZE or PREFERRED_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 Component
the Component to add
min int
the minimum size
pref int
the preferred size
max int
the maximum size

Returns

this SequentialGroup

Throws

IllegalArgumentException
if min, pref or max are not positive and not one of PREFERRED_SIZE or DEFAULT_SIZE.

add

public GroupLayout.ParallelGroup add(int pref)
Adds a rigid gap.

Parameters

pref int
the size of the gap

Returns

this ParallelGroup

Throws

IllegalArgumentException
if min < 0 or pref < 0 or max < 0 or the following is not meant min <= pref <= max.

add

public GroupLayout.ParallelGroup add(int min, int pref, int max)
Adds a gap with the specified size.

Parameters

min int
the minimum size of the gap
pref int
the preferred size of the gap
max int
the maximum size of the gap

Returns

this ParallelGroup

Throws

IllegalArgumentException
if min < 0 or pref < 0 or max < 0 or the following is not meant min <= pref <= max.

add

public GroupLayout.ParallelGroup add(int alignment, GroupLayout.Group group)
Adds the specified Group as a child of this group.

Parameters

alignment int
the alignment of the Group.
group GroupLayout.Group
the Group to add

Returns

this ParallelGroup

Throws

IllegalArgumentException
if alignment is not one of LEADING, TRAILING or CENTER

add

public GroupLayout.ParallelGroup add(int alignment, Component component)
Adds the specified Component. If the Component’s min/max are different from its pref than the component will be resizable.

Parameters

alignment int
the alignment for the component
component Component
the Component to add

Returns

this Group

Throws

IllegalArgumentException
if alignment is not one of LEADING, TRAILING or CENTER

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 of DEFAULT_SIZE or PREFERRED_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 int
the alignment for the component.
component Component
the Component to add
min int
the minimum size
pref int
the preferred size
max int
the maximum size

Returns

this Group

Throws

IllegalArgumentException
if min, pref or max are not positive and not one of PREFERRED_SIZE or DEFAULT_SIZE.