private void createRoleSummary ( final VerticalLayout roleSummaryLayoutTabsheet , final List < AssignmentData > assignmentList , final ViewRiksdagenPolitician viewRiksdagenPolitician ) { final VerticalLayout layout = new VerticalLayout ( ) ; layout . setSizeFull ( ) ; layout . addComponent ( new Label ( TOTAL_ASSIGNMENTS + assignmentList . size ( ) ) ) ; if ( viewRiksdagenPolitician != null ) { layout . addComponent ( new Label ( GOVERNMENT_EXPERIENCE + convertToYearsString ( viewRiksdagenPolitician . getTotalDaysServedGovernment ( ) ) ) ) ; layout . addComponent ( new Label ( SPEAKER_EXPERIENCE + convertToYearsString ( viewRiksdagenPolitician . getTotalDaysServedSpeaker ( ) ) ) ) ; layout . addComponent ( new Label ( COMMITTEE_EXPERIENCE + convertToYearsString ( viewRiksdagenPolitician . getTotalDaysServedCommittee ( ) ) ) ) ; layout . addComponent ( new Label ( EU_EXPERIENCE + convertToYearsString ( viewRiksdagenPolitician . getTotalDaysServedEu ( ) ) ) ) ; layout . addComponent ( new Label ( PARLIAMENT_EXPERIENCE + convertToYearsString ( viewRiksdagenPolitician . getTotalDaysServedParliament ( ) ) ) ) ; layout . addComponent ( new Label ( PARTY_EXPERIENCE + convertToYearsString ( viewRiksdagenPolitician . getTotalDaysServedParty ( ) ) ) ) ; } roleSummaryLayoutTabsheet . addComponent ( layout ) ; roleSummaryLayoutTabsheet . setExpandRatio ( layout , ContentRatio . GRID ) ; }
Creates the role summary .