use of javax.swing.SizeRequirements in project jdk8u_jdk by JetBrains.
the class TableView method checkSingleColumnCell.
/**
* check the requirements of a table cell that spans a single column.
*/
void checkSingleColumnCell(int axis, int col, View v) {
SizeRequirements req = columnRequirements[col];
req.minimum = Math.max((int) v.getMinimumSpan(axis), req.minimum);
req.preferred = Math.max((int) v.getPreferredSpan(axis), req.preferred);
req.maximum = Math.max((int) v.getMaximumSpan(axis), req.maximum);
}
use of javax.swing.SizeRequirements in project jdk8u_jdk by JetBrains.
the class FlowView method calculateMinorAxisRequirements.
/**
* Calculate requirements along the minor axis. This
* is implemented to forward the request to the logical
* view by calling getMinimumSpan, getPreferredSpan, and
* getMaximumSpan on it.
*/
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) {
if (r == null) {
r = new SizeRequirements();
}
float pref = layoutPool.getPreferredSpan(axis);
float min = layoutPool.getMinimumSpan(axis);
// Don't include insets, Box.getXXXSpan will include them.
r.minimum = (int) min;
r.preferred = Math.max(r.minimum, (int) pref);
r.maximum = Integer.MAX_VALUE;
r.alignment = 0.5f;
return r;
}
Aggregations