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.
Returns:
this {@code SequentialGroup}
Parameters:
-
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 >= 0
-
max - the maximum size of the gap; one of
{@code DEFAULT_SIZE}, {@code PREFERRED_SIZE}
or a value >= 0
Throws:
-
IllegalArgumentException - if {@code type} is not one of
{@code LayoutStyle.ComponentPlacement.RELATED} or
{@code LayoutStyle.ComponentPlacement.UNRELATED}
See Also:
LayoutStyle
,