public PositionAlignmentOptions setHorizontalAlignment ( PositionRelation horizontalAlignment , int offsetLeft ) { switch ( horizontalAlignment ) { case LEFT : case CENTER : case RIGHT : break ; default : throw new IllegalArgumentException ( "Illegal value for the horizontal alignment property" ) ; } this . horizontalAlignment = horizontalAlignment ; this . offsetLeft = offsetLeft ; return this ; }
Set the horizontalAlignment property with an offset . One of LEFT CENTER RIGHT .