- java.lang.Object
- 
- javax.swing.GroupLayout.Group
- 
- javax.swing.GroupLayout.SequentialGroup
 
 
- 
- Enclosing class:
- GroupLayout
 
 public class GroupLayout.SequentialGroup extends GroupLayout.Group AGroupthat positions and sizes its elements sequentially, one after another. This class has no public constructor, use thecreateSequentialGroupmethod to create one.In order to align a SequentialGroupalong the baseline of a baseline alignedParallelGroupyou need to specify which of the elements of theSequentialGroupis used to determine the baseline. The element used to calculate the baseline is specified using one of theaddmethods that take aboolean. The last element added with a value oftrueforuseAsBaselineis used to calculate the baseline.- Since:
- 1.6
- See Also:
- GroupLayout.createSequentialGroup()
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupLayout.SequentialGroupaddComponent(boolean useAsBaseline, Component component)Adds aComponentto thisGroup.GroupLayout.SequentialGroupaddComponent(boolean useAsBaseline, Component component, int min, int pref, int max)Adds aComponentto thisGroupwith the specified size.GroupLayout.SequentialGroupaddContainerGap()Adds an element representing the preferred gap between an edge the container and components that touch the border of the container.GroupLayout.SequentialGroupaddContainerGap(int pref, int max)Adds an element representing the preferred gap between one edge of the container and the next or previousComponentwith the specified size.GroupLayout.SequentialGroupaddGroup(boolean useAsBaseline, GroupLayout.Group group)Adds aGroupto thisGroup.GroupLayout.SequentialGroupaddPreferredGap(JComponent comp1, JComponent comp2, LayoutStyle.ComponentPlacement type)Adds an element representing the preferred gap between two components.GroupLayout.SequentialGroupaddPreferredGap(JComponent comp1, JComponent comp2, LayoutStyle.ComponentPlacement type, int pref, int max)Adds an element representing the preferred gap between two components.GroupLayout.SequentialGroupaddPreferredGap(LayoutStyle.ComponentPlacement type)Adds an element representing the preferred gap between the nearest components.GroupLayout.SequentialGroupaddPreferredGap(LayoutStyle.ComponentPlacement type, int pref, int max)Adds an element representing the preferred gap between the nearest components.- 
Methods declared in class javax.swing.GroupLayout.GroupaddComponent, addComponent, addGap, addGap, addGroup
 
- 
 
- 
- 
- 
Method Detail- 
addGrouppublic GroupLayout.SequentialGroup addGroup(boolean useAsBaseline, GroupLayout.Group group) Adds aGroupto thisGroup.- Parameters:
- group- the- Groupto add
- useAsBaseline- whether the specified- Groupshould be used to calculate the baseline for this- Group
- Returns:
- this Group
 
 - 
addComponentpublic GroupLayout.SequentialGroup addComponent(boolean useAsBaseline, Component component) Adds aComponentto thisGroup.- Parameters:
- useAsBaseline- whether the specified- Componentshould be used to calculate the baseline for this- Group
- component- the- Componentto add
- Returns:
- this Group
 
 - 
addComponentpublic GroupLayout.SequentialGroup addComponent(boolean useAsBaseline, Component component, int min, int pref, int max) Adds aComponentto thisGroupwith the specified size.- Parameters:
- useAsBaseline- whether the specified- Componentshould be used to calculate the baseline for this- Group
- component- the- Componentto add
- min- the minimum size or one of- DEFAULT_SIZEor- PREFERRED_SIZE
- pref- the preferred size or one of- DEFAULT_SIZEor- PREFERRED_SIZE
- max- the maximum size or one of- DEFAULT_SIZEor- PREFERRED_SIZE
- Returns:
- this Group
 
 - 
addPreferredGappublic GroupLayout.SequentialGroup addPreferredGap(JComponent comp1, JComponent comp2, LayoutStyle.ComponentPlacement type) Adds an element representing the preferred gap between two components. The element created to represent the gap is not resizable.- Parameters:
- comp1- the first component
- comp2- the second component
- type- the type of gap; one of the constants defined by- LayoutStyle
- Returns:
- this SequentialGroup
- Throws:
- IllegalArgumentException- if- type,- comp1or- comp2is- null
- See Also:
- LayoutStyle
 
 - 
addPreferredGappublic GroupLayout.SequentialGroup addPreferredGap(JComponent comp1, JComponent comp2, LayoutStyle.ComponentPlacement type, int pref, int max) Adds an element representing the preferred gap between two components.- Parameters:
- comp1- the first component
- comp2- the second component
- type- the type of gap
- pref- the preferred size of the grap; one of- DEFAULT_SIZEor a value >= 0
- max- the maximum size of the gap; one of- DEFAULT_SIZE,- PREFERRED_SIZEor a value >= 0
- Returns:
- this SequentialGroup
- Throws:
- IllegalArgumentException- if- type,- comp1or- comp2is- null
- See Also:
- LayoutStyle
 
 - 
addPreferredGappublic GroupLayout.SequentialGroup addPreferredGap(LayoutStyle.ComponentPlacement type) 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 of0.The element created to represent the gap is not resizable. - Parameters:
- type- the type of gap; one of- LayoutStyle.ComponentPlacement.RELATEDor- LayoutStyle.ComponentPlacement.UNRELATED
- Returns:
- this SequentialGroup
- Throws:
- IllegalArgumentException- if- typeis not one of- LayoutStyle.ComponentPlacement.RELATEDor- LayoutStyle.ComponentPlacement.UNRELATED
- See Also:
- LayoutStyle
 
 - 
addPreferredGappublic GroupLayout.SequentialGroup addPreferredGap(LayoutStyle.ComponentPlacement type, int pref, int max) 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.- Parameters:
- type- the type of gap; one of- LayoutStyle.ComponentPlacement.RELATEDor- LayoutStyle.ComponentPlacement.UNRELATED
- pref- the preferred size of the grap; one of- DEFAULT_SIZEor a value >= 0
- max- the maximum size of the gap; one of- DEFAULT_SIZE,- PREFERRED_SIZEor a value >= 0
- Returns:
- this SequentialGroup
- Throws:
- IllegalArgumentException- if- typeis not one of- LayoutStyle.ComponentPlacement.RELATEDor- LayoutStyle.ComponentPlacement.UNRELATED
- See Also:
- LayoutStyle
 
 - 
addContainerGappublic GroupLayout.SequentialGroup addContainerGap() 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. - Returns:
- this SequentialGroup
 
 - 
addContainerGappublic GroupLayout.SequentialGroup addContainerGap(int pref, int max) Adds an element representing the preferred gap between one edge of the container and the next or previousComponentwith the specified size. This has no effect if the next or previous element is not aComponentand does not touch one edge of the parent container.- Parameters:
- pref- the preferred size; one of- DEFAULT_SIZEor a value >= 0
- max- the maximum size; one of- DEFAULT_SIZE,- PREFERRED_SIZEor a value >= 0
- Returns:
- this SequentialGroup
 
 
- 
 
-