boolean labelUnderline, boolean labelBold, boolean labelItalic ) { ItemBand rowBand = new ItemBand(); rowBand.setLayout( BandStyleKeys.LAYOUT_ROW );
group.addField( "filename" ); GroupDataBody groupData = new GroupDataBody(); ItemBand itemBand = new ItemBand(); itemBand.setVisible( true ); itemBand.setLayout( BandStyleKeys.LAYOUT_AUTO ); imageElement.setAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.IMAGE_ENCODING_TYPE, "PNG" ); ItemBand imageBand = new ItemBand(); imageBand.setLayout( BandStyleKeys.LAYOUT_ROW ); imageBand.addElement( imageElement );
public ReportElement create() { return new ItemBand(); }
@Test public void testSetItemBand() { ItemBand itemBand = mock( ItemBand.class ); body.setItemBand( itemBand ); assertThat( body.getItemBand(), is( equalTo( itemBand ) ) ); assertThat( (GroupDataBody) body.getItemBand().getParentSection(), is( equalTo( body ) ) ); ItemBand band = new ItemBand(); band.setParent( body ); body.setItemBand( band ); assertThat( body.getItemBand(), is( equalTo( itemBand ) ) ); }
public GroupDataBody() { setElementType( new GroupDataBodyType() ); this.noDataBand = new NoDataBand(); this.itemBand = new ItemBand(); this.detailsHeader = new DetailsHeader(); this.detailsFooter = new DetailsFooter(); registerAsChild( noDataBand ); registerAsChild( itemBand ); registerAsChild( detailsHeader ); registerAsChild( detailsFooter ); }
group.setName( "a" ); GroupDataBody groupBody = new GroupDataBody(); ItemBand ib = new ItemBand(); Mockito.doReturn( schema ).when( fc ).getDataSchema(); Mockito.doReturn( new String[] { "a" } ).when( schema ).getNames();
public void testFindElement() { final Band noLate = new Band(); noLate.setName( "noLate" ); final Band landScape = new Band(); landScape.setName( "landscape" ); landScape.addElement( noLate ); final ItemBand band = new ItemBand(); band.addElement( landScape ); assertEquals( noLate, FunctionUtilities.findElement( band, "noLate" ) ); } }
protected void removeElement( final Element element ) { if ( element == null ) { throw new NullPointerException(); } if ( element == itemBand ) { this.itemBand.setParent( null ); this.itemBand = new ItemBand(); this.itemBand.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.itemBand ); } else if ( element == noDataBand ) { this.noDataBand.setParent( null ); this.noDataBand = new NoDataBand(); this.noDataBand.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.noDataBand ); } else if ( element == detailsHeader ) { this.detailsHeader.setParent( null ); this.detailsHeader = new DetailsHeader(); this.detailsHeader.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.detailsHeader ); } else if ( element == detailsFooter ) { this.detailsFooter.setParent( null ); this.detailsFooter = new DetailsFooter(); this.detailsFooter.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.detailsFooter ); } }