Package com.jgoodies.forms.extras
Class FormLayoutUtils
- java.lang.Object
-
- com.jgoodies.forms.extras.FormLayoutUtils
-
public final class FormLayoutUtils extends java.lang.ObjectConsists only of static methods that provide convenience behavior for working with theFormLayout.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.
- Version:
- $Revision: 1.9 $
- Author:
- Karsten Lentzsch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFormLayoutUtils.ConstraintIteratorIterates over a FormLayout container'sCellConstraints.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancolumnContainsComponent(java.awt.Container container, int columnIndex)Checks and answers whether the given FormLayout container contains a component in the specified column.static booleanisGroupedColumn(FormLayout layout, int columnIndex)Checks and answers whether the specified column is grouped in the given FormLayout.static booleanisGroupedRow(FormLayout layout, int rowIndex)Checks and answers whether the specified row is grouped in the given FormLayout.static booleanrowContainsComponent(java.awt.Container container, int rowIndex)Checks and answers whether the given FormLayout container contains a component in the specified row.
-
-
-
Method Detail
-
columnContainsComponent
public static boolean columnContainsComponent(java.awt.Container container, int columnIndex)Checks and answers whether the given FormLayout container contains a component in the specified column.For every container child component, we look up the associated
CellConstraintsobject from the layout and compare its horizontal grid origin with the specified column index.- Parameters:
container- the layout containercolumnIndex- the index of the column to test- Returns:
- true if the column contains a component, false otherwise
- Throws:
java.lang.IllegalArgumentException- if the container's layout is not aFormLayout
-
rowContainsComponent
public static boolean rowContainsComponent(java.awt.Container container, int rowIndex)Checks and answers whether the given FormLayout container contains a component in the specified row.For every container child component, we look up the associated
CellConstraintsobject from the layout and compare its vertical grid origin with the specified row index.- Parameters:
container- the layout containerrowIndex- the index of the row to test- Returns:
- true if the row contains a component, false otherwise
- Throws:
java.lang.IllegalArgumentException- if the container's layout is not aFormLayout
-
isGroupedColumn
public static boolean isGroupedColumn(FormLayout layout, int columnIndex)
Checks and answers whether the specified column is grouped in the given FormLayout. A columncolis grouped, if and only if there's a column group group that includescol's index.- Parameters:
layout- the layout to be inspectedcolumnIndex- the index of the column to be checked- Returns:
- true if the column is grouped, false if not
-
isGroupedRow
public static boolean isGroupedRow(FormLayout layout, int rowIndex)
Checks and answers whether the specified row is grouped in the given FormLayout. A rowrowis grouped, if and only if there's a row group group that includesrow's index.- Parameters:
layout- the layout to be inspectedrowIndex- the index of the row to be checked- Returns:
- true if the column is grouped, false if not
-
-