| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
GroupLayout layout = …;
GroupLayout.SequentialGroup hGroup = layout.createSequentialGroup();
Based on 249 examples
public class GroupLayout.SequentialGroup extends GroupLayout.Group
A {@code Group} that positions and sizes its elements sequentially, one after another. This class has no public constructor, use the {@code createSequentialGroup} method to create one.
In order to align a {@code SequentialGroup} along the baseline of a baseline aligned {@code ParallelGroup} you need to specify which of the elements of the {@code SequentialGroup} is used to determine the baseline. The element used to calculate the baseline is specified using one of the {@code add} methods that take a {@code boolean}. The last element added with a value of {@code true} for {@code useAsBaseline} is used to calculate the baseline.
Method Summary | |
---|---|
GroupLayout.SequentialGroup |
addComponent(boolean useAsBaseline, Component component) Adds a to this . |
GroupLayout.SequentialGroup |
addComponent(boolean useAsBaseline, Component component, int min, int pref, int max) Adds a to this with the specified size. |
GroupLayout.SequentialGroup |
addComponent(Component component) Adds a to this . |
GroupLayout.SequentialGroup |
addComponent(Component component, int min, int pref, int max) Adds a to this . |
GroupLayout.SequentialGroup |
Adds an element representing the preferred gap between an edge the container and components that touch the border of the container. |
GroupLayout.SequentialGroup |
addContainerGap(int pref, int max) Adds an element representing the preferred gap between one edge of the container and the next or previous with the specified size. |
GroupLayout.SequentialGroup |
addGap(int size) Adds a rigid gap to this . |
GroupLayout.SequentialGroup |
addGap(int min, int pref, int max) Adds a rigid gap to this . |
GroupLayout.SequentialGroup |
addGroup(boolean useAsBaseline, GroupLayout.Group group) Adds a to this . |
GroupLayout.SequentialGroup |
addGroup(GroupLayout.Group group) Adds a to this . |
GroupLayout.SequentialGroup |
addPreferredGap(JComponent comp1, JComponent comp2, LayoutStyle.ComponentPlacement type) Adds an element representing the preferred gap between two components. |
GroupLayout.SequentialGroup |
addPreferredGap(JComponent comp1, JComponent comp2, LayoutStyle.ComponentPlacement type, int pref, int max) Adds an element representing the preferred gap between two components. |
GroupLayout.SequentialGroup |
Adds an element representing the preferred gap between the nearest components. |
GroupLayout.SequentialGroup |
addPreferredGap(LayoutStyle.ComponentPlacement type, int pref, int max) Adds an element representing the preferred gap between the nearest components. |
Methods inherited from class javax.swing.GroupLayout.Group |
---|
addComponent, addComponent, addGap, addGap, addGroup |
Method Detail |
---|
public GroupLayout.SequentialGroup addComponent(boolean useAsBaseline, Component component)
useAsBaseline
- whether the specified {@code Component} should
be used to calculate the baseline for this {@code Group}component
- the {@code Component} to addpublic GroupLayout.SequentialGroup addComponent(boolean useAsBaseline, Component component, int min, int pref, int max)
useAsBaseline
- whether the specified {@code Component} should
be used to calculate the baseline for this {@code Group}component
- the {@code Component} to addmin
- the minimum size or one of {@code DEFAULT_SIZE} or
{@code PREFERRED_SIZE}pref
- the preferred size or one of {@code DEFAULT_SIZE} or
{@code PREFERRED_SIZE}max
- the maximum size or one of {@code DEFAULT_SIZE} or
{@code PREFERRED_SIZE}public GroupLayout.SequentialGroup addComponent(Component component)
addComponent
in class GroupLayout.Group
component
public GroupLayout.SequentialGroup addComponent(Component component, int min, int pref, int max)
addComponent
in class GroupLayout.Group
component
min
pref
max
public GroupLayout.SequentialGroup addContainerGap()
The element created to represent the gap is not resizable.
public GroupLayout.SequentialGroup addContainerGap(int pref, int max)
pref
- the preferred size; one of {@code DEFAULT_SIZE} or a
value >= 0max
- the maximum size; one of {@code DEFAULT_SIZE},
{@code PREFERRED_SIZE} or a value >= 0public GroupLayout.SequentialGroup addGap(int size)
addGap
in class GroupLayout.Group
size
public GroupLayout.SequentialGroup addGap(int min, int pref, int max)
addGap
in class GroupLayout.Group
min
pref
max
public GroupLayout.SequentialGroup addGroup(boolean useAsBaseline, GroupLayout.Group group)
useAsBaseline
- whether the specified {@code Group} should
be used to calculate the baseline for this {@code Group}group
- the {@code Group} to addpublic GroupLayout.SequentialGroup addGroup(GroupLayout.Group group)
addGroup
in class GroupLayout.Group
group
public GroupLayout.SequentialGroup addPreferredGap(JComponent comp1, JComponent comp2, LayoutStyle.ComponentPlacement type)
comp1
- the first componentcomp2
- the second componenttype
- the type of gap; one of the constants defined by
{@code LayoutStyle}public GroupLayout.SequentialGroup addPreferredGap(JComponent comp1, JComponent comp2, LayoutStyle.ComponentPlacement type, int pref, int max)
comp1
- the first componentcomp2
- the second componenttype
- the type of gappref
- the preferred size of the grap; one of
{@code DEFAULT_SIZE} or a value >= 0max
- the maximum size of the gap; one of
{@code DEFAULT_SIZE}, {@code PREFERRED_SIZE}
or a value >= 0public GroupLayout.SequentialGroup addPreferredGap(LayoutStyle.ComponentPlacement type)
The element created to represent the gap is not resizable.
type
- the type of gap; one of
{@code LayoutStyle.ComponentPlacement.RELATED} or
{@code LayoutStyle.ComponentPlacement.UNRELATED}public GroupLayout.SequentialGroup addPreferredGap(LayoutStyle.ComponentPlacement type, int pref, int max)
type
- the type of gap; one of
{@code LayoutStyle.ComponentPlacement.RELATED} or
{@code LayoutStyle.ComponentPlacement.UNRELATED}pref
- the preferred size of the grap; one of
{@code DEFAULT_SIZE} or a value >= 0max
- the maximum size of the gap; one of
{@code DEFAULT_SIZE}, {@code PREFERRED_SIZE}
or a value >= 0
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |