public final class FormLayoutUtils extends Object
FormLayout
.Note: This class is not part of the binary Form library. It comes with the Forms distributions as an extra. The API is work in progress and may change without notice; this class may even be completely removed from future distributions. If you want to use this class, you may consider copying it into your codebase.
Modifier and Type | Class and Description |
---|---|
static class |
FormLayoutUtils.ConstraintIterator
Iterates over a FormLayout container's
CellConstraints . |
Modifier and Type | Method and Description |
---|---|
static boolean |
columnContainsComponent(Container container,
int columnIndex)
Checks and answers whether the given FormLayout container
contains a component in the specified column.
|
static boolean |
isGroupedColumn(FormLayout layout,
int columnIndex)
Checks and answers whether the specified column is grouped
in the given FormLayout.
|
static boolean |
isGroupedRow(FormLayout layout,
int rowIndex)
Checks and answers whether the specified row is grouped
in the given FormLayout.
|
static boolean |
rowContainsComponent(Container container,
int rowIndex)
Checks and answers whether the given FormLayout container
contains a component in the specified row.
|
public static boolean columnContainsComponent(Container container, int columnIndex)
For every container child component, we look up the associated
CellConstraints
object from the layout and
compare its horizontal grid origin with the specified column index.
container
- the layout containercolumnIndex
- the index of the column to testIllegalArgumentException
- if the container's layout is
not a FormLayout
public static boolean rowContainsComponent(Container container, int rowIndex)
For every container child component, we look up the associated
CellConstraints
object from the layout and
compare its vertical grid origin with the specified row index.
container
- the layout containerrowIndex
- the index of the row to testIllegalArgumentException
- if the container's layout is
not a FormLayout
public static boolean isGroupedColumn(FormLayout layout, int columnIndex)
col
is grouped,
if and only if there's a column group group
that includes col
's index.layout
- the layout to be inspectedcolumnIndex
- the index of the column to be checkedpublic static boolean isGroupedRow(FormLayout layout, int rowIndex)
row
is grouped,
if and only if there's a row group group
that includes row
's index.layout
- the layout to be inspectedrowIndex
- the index of the row to be checkedCopyright © 2002-2014 JGoodies Software GmbH. All Rights Reserved.