public Element getElement( final int index ) { switch ( index ) { case 0: return header; case 1: return getBody(); case 2: return footer; default: throw new IndexOutOfBoundsException(); } }
@Deprecated public GroupDataBody findGroupDataBody() { final GroupBody body = getBody(); if ( body instanceof GroupDataBody ) { return (GroupDataBody) body; } if ( body instanceof SubGroupBody ) { final SubGroupBody groupBody = (SubGroupBody) body; final Group group = groupBody.getGroup(); if ( group instanceof RelationalGroup ) { final RelationalGroup rg = (RelationalGroup) group; return rg.findGroupDataBody(); } } return null; }
@Test public void testSetElementAt() { GroupHeader header = mock( GroupHeader.class ); SubGroupBody body = mock( SubGroupBody.class ); GroupFooter footer = mock( GroupFooter.class ); group.setElementAt( 0, header ); group.setElementAt( 1, body ); group.setElementAt( 2, footer ); assertThat( group.getHeader(), is( equalTo( header ) ) ); assertThat( (SubGroupBody) group.getBody(), is( equalTo( body ) ) ); assertThat( group.getFooter(), is( equalTo( footer ) ) ); }
public void groupStarted( final DefaultOutputFunction outputFunction, final ReportEvent event ) throws ReportProcessingException { final int gidx = event.getState().getCurrentGroupIndex(); final RelationalGroup group = (RelationalGroup) event.getReport().getGroup( gidx ); final Band b = group.getHeader(); final GroupBody groupBody = group.getBody(); outputFunction.updateFooterArea( event ); final Renderer renderer = outputFunction.getRenderer(); renderer.startGroup( group, event.getState().getPredictedStateCount() ); renderer.startSection( Renderer.SectionType.NORMALFLOW ); outputFunction.print( outputFunction.getRuntime(), b ); outputFunction.addSubReportMarkers( renderer.endSection() ); renderer.startGroupBody( groupBody, event.getState().getPredictedStateCount() ); }
final GroupDataBody body = (GroupDataBody) innerGroup.getBody(); final ItemBand band = body.getItemBand(); band.setLayout( "row" );