public void populateGroupsLegendByGroups ( final List < RolloutGroup > groups ) { loadingLabel . setVisible ( false ) ; for ( int i = 0 ; i < getGroupsWithoutToBeContinuedLabel ( groups . size ( ) ) ; i ++ ) { final Component component = groupsLegend . getComponent ( i ) ; final Label label = ( Label ) component ; if ( groups . size ( ) > i ) { final int targetCount = groups . get ( i ) . getTotalTargets ( ) ; final String groupName = groups . get ( i ) . getName ( ) ; label . setValue ( getTargetsInGroupMessage ( ( long ) targetCount , groupName ) ) ; label . setVisible ( true ) ; } else { label . setValue ( "" ) ; label . setVisible ( false ) ; } } showOrHideToBeContinueLabel ( groups ) ; }
Populates the legend based on a list of groups .