Package org.jdesktop.layout
Class GroupLayout.ParallelGroup
- java.lang.Object
-
- org.jdesktop.layout.GroupLayout.Group
-
- org.jdesktop.layout.GroupLayout.ParallelGroup
-
- Enclosing class:
- GroupLayout
public class GroupLayout.ParallelGroup extends GroupLayout.Group
AGroup
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:
GroupLayout.createParallelGroup()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupLayout.ParallelGroup
add(int pref)
Adds a rigid gap.GroupLayout.ParallelGroup
add(int min, int pref, int max)
Adds a gap with the specified size.GroupLayout.ParallelGroup
add(int alignment, java.awt.Component component)
Adds the specified Component.GroupLayout.ParallelGroup
add(int alignment, java.awt.Component component, int min, int pref, int max)
Adds the specifiedComponent
.GroupLayout.ParallelGroup
add(int alignment, GroupLayout.Group group)
Adds the specifiedGroup
as a child of this group.GroupLayout.ParallelGroup
add(java.awt.Component component)
Adds the specified Component.GroupLayout.ParallelGroup
add(java.awt.Component component, int min, int pref, int max)
Adds the specifiedComponent
.GroupLayout.ParallelGroup
add(GroupLayout.Group group)
Adds the specifiedGroup
.
-
-
-
Method Detail
-
add
public GroupLayout.ParallelGroup add(GroupLayout.Group group)
Adds the specifiedGroup
.- Parameters:
group
- the Group to add- Returns:
- this Group
-
add
public GroupLayout.ParallelGroup add(java.awt.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
- the Component to add- Returns:
- this
ParallelGroup
-
add
public GroupLayout.ParallelGroup add(java.awt.Component component, int min, int pref, int max)
Adds the specifiedComponent
. Min, pref and max can be absolute values, or they can be one ofDEFAULT_SIZE
orPREFERRED_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 ofcomponent
.- Parameters:
component
- the Component to addmin
- the minimum sizepref
- the preferred sizemax
- the maximum size- Returns:
- this
SequentialGroup
- Throws:
java.lang.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
- the size of the gap- Returns:
- this
ParallelGroup
- Throws:
java.lang.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
- the minimum size of the gappref
- the preferred size of the gapmax
- the maximum size of the gap- Returns:
- this
ParallelGroup
- Throws:
java.lang.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 specifiedGroup
as a child of this group.- Parameters:
alignment
- the alignment of the Group.group
- the Group to add- Returns:
- this
ParallelGroup
- Throws:
java.lang.IllegalArgumentException
- if alignment is not one ofLEADING
,TRAILING
orCENTER
-
add
public GroupLayout.ParallelGroup add(int alignment, java.awt.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
- the alignment for the componentcomponent
- the Component to add- Returns:
- this
Group
- Throws:
java.lang.IllegalArgumentException
- if alignment is not one ofLEADING
,TRAILING
orCENTER
-
add
public GroupLayout.ParallelGroup add(int alignment, java.awt.Component component, int min, int pref, int max)
Adds the specifiedComponent
. Min, pref and max can be absolute values, or they can be one ofDEFAULT_SIZE
orPREFERRED_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 ofcomponent
.- Parameters:
alignment
- the alignment for the component.component
- the Component to addmin
- the minimum sizepref
- the preferred sizemax
- the maximum size- Returns:
- this
Group
- Throws:
java.lang.IllegalArgumentException
- if min, pref or max are not positive and not one of PREFERRED_SIZE or DEFAULT_SIZE.
-
-