/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* A layout manager for a container that lays out grids. Allows setting
* the relative sizes of rows and columns.
*
* @author Herb Jellinek
*/
int rows;
int cols;
int hgap;
int vgap;
/**
* Creates a grid layout with the specified rows and specified columns.
* @param rows the rows
* @param cols the columns
*/
if (rows != 0) {
}
if (cols != 0) {
}
}
/**
* Creates a grid layout with the specified rows, columns,
* horizontal gap, and vertical gap.
* @param rows the rows
* @param cols the columns
* @param hgap the horizontal gap variable
* @param vgap the vertical gap variable
* @exception IllegalArgumentException If the rows and columns are invalid.
*/
if (rows != 0) {
}
if (cols != 0) {
}
}
rowFractions = new double[nrows];
for (int i = 0; i < nrows; i++) {
}
}
colFractions = new double[ncols];
for (int i = 0; i < ncols; i++) {
}
}
}
}
return rowFractions[rowNum];
}
return colFractions[colNum];
}
// collect the space that's been explicitly allocated...
double total = 0.0;
int unallocated = 0;
int i;
} else {
unallocated++;
}
}
// ... then spread the extra space
if (unallocated != 0) {
}
}
}
}
void allocateExtraSpace() {
}
/**
* Lays out the container in the specified panel.
* @param parent the specified component being laid out
* @see Container
*/
if (nrows > 0) {
} else {
}
if (rows == 0) {
}
if (cols == 0) {
}
int colWidth = (int)(getColFraction(c) * w);
int i = r * ncols + c;
int rowHeight = (int)(getRowFraction(r) * h);
if (i < ncomponents) {
}
}
}
}
}
return result;
}
/**
* Returns the String representation of this VariableGridLayout's values.
*/
",rowFracs=" +
",colFracs=" +
}
}