public static HorizontalPanel newRow ( HasAlignment . VerticalAlignmentConstant valign , String styleName , Widget ... contents ) { HorizontalPanel row = new HorizontalPanel ( ) ; row . setVerticalAlignment ( valign ) ; if ( styleName != null ) { row . setStyleName ( styleName ) ; } for ( Widget widget : contents ) { if ( widget != null ) { if ( row . getWidgetCount ( ) > 0 ) { row . add ( newShim ( 5 , 5 ) ) ; } row . add ( widget ) ; } } return row ; }
Creates a row of widgets in a horizontal panel with a 5 pixel gap between them . The supplied style name is added to the container panel .