question: private void baselineLayout ( int origin , int size ) { int ascent ; int descent ; if ( baselineAnchoredToTop ) { ascent = prefAscent ; descent = size - ascent ; } else { ascent = size - prefDescent ; descent = prefDescent ; } for ( Spring spring : springs ) { Alignment alignment = spring . getAlignment ( ) ; if ( alignment == null || alignment == Alignment . BASELINE ) { int baseline = spring . getBaseline ( ) ; if ( baseline >= 0 ) { int springMax = spring . getMaximumSize ( VERTICAL ) ; int springPref = spring . getPreferredSize ( VERTICAL ) ; int height = springPref ; int y ; switch ( spring . getBaselineResizeBehavior ( ) ) { case CONSTANT_ASCENT : y = origin + ascent - baseline ; height = Math . min ( descent , springMax - baseline ) + baseline ; break ; case CONSTANT_DESCENT : height = Math . min ( ascent , springMax - springPref + baseline ) + ( springPref - baseline ) ; y = origin + ascent + ( springPref - baseline ) - height ; break ; default : y = origin + ascent - baseline ; break ; } spring . setSize ( VERTICAL , y , height ) ; } else { setChildSize ( spring , VERTICAL , origin , size ) ; } } else { setChildSize ( spring , VERTICAL , origin , size ) ; } } }
target:  Lays out springs that have a baseline along the baseline.  All others are centered.