private void calculateBaselineAndResizeBehavior() {
// calculate baseline
prefAscent = 0;
prefDescent = 0;
int baselineSpringCount = 0;
BaselineResizeBehavior resizeBehavior = null;
for (Spring spring : springs) {
if (spring.getAlignment() == null ||
spring.getAlignment() == Alignment.BASELINE) {
int baseline = spring.getBaseline();
if (baseline >= 0) {
if (spring.isResizable(VERTICAL)) {
BaselineResizeBehavior brb = spring.
getBaselineResizeBehavior();
if (resizeBehavior == null) {
resizeBehavior = brb;
} else if (brb != resizeBehavior) {
resizeBehavior = BaselineResizeBehavior.