Logo Search packages:      
Sourcecode: libjgoodies-forms-java version File versions  Download package

com::jgoodies::forms::layout::FormLayout::FormLayout ( ColumnSpec[]  colSpecs,
RowSpec[]  rowSpecs 
) [inline]

Constructs an instance of FormLayout using the given column and row specifications.

colSpecs an array of column specifications.
rowSpecs an array of row specifications.
NullPointerException if colSpecs or rowSpecs is null

Definition at line 245 of file FormLayout.java.

References colGroupIndices, componentSizeCache, constraintMap, minimumWidthMeasure, and rowGroupIndices.

        if (colSpecs == null)
            throw new NullPointerException("The column specifications must not be null.");
        if (rowSpecs == null)
            throw new NullPointerException("The row specifications must not be null.");
        this.colSpecs  = new ArrayList(Arrays.asList(colSpecs));
        this.rowSpecs  = new ArrayList(Arrays.asList(rowSpecs));
        colGroupIndices = new int[][]{};
        rowGroupIndices = new int[][]{};
        int initialCapacity = colSpecs.length * rowSpecs.length / 4;
        constraintMap       = new HashMap(initialCapacity);
        componentSizeCache  = new ComponentSizeCache(initialCapacity);
        minimumWidthMeasure    = new MinimumWidthMeasure(componentSizeCache);
        minimumHeightMeasure   = new MinimumHeightMeasure(componentSizeCache);
        preferredWidthMeasure  = new PreferredWidthMeasure(componentSizeCache);
        preferredHeightMeasure = new PreferredHeightMeasure(componentSizeCache);

Generated by  Doxygen 1.6.0   Back to index