public PositionAlignmentOptions setVerticalAlignment ( PositionRelation verticalAlignment , int offsetTop ) { switch ( verticalAlignment ) { case TOP : case CENTER : case BOTTOM : break ; default : throw new IllegalArgumentException ( "Illegal value for the vertical alignment property" ) ; } this . verticalAlignment = verticalAlignment ; this . offsetTop = offsetTop ; return this ; }
Set the verticalAlignment property with an offset . One of TOP CENTER BOTTOM .