public static boolean isGroupSectionPrintable( final Band b, final boolean testSticky, final boolean testRepeat ) { final StyleSheet resolverStyleSheet = b.getComputedStyle(); if ( testSticky && resolverStyleSheet.getBooleanStyleProperty( BandStyleKeys.STICKY ) == false ) { return false; } if ( testRepeat && resolverStyleSheet.getBooleanStyleProperty( BandStyleKeys.REPEAT_HEADER ) == false ) { return false; } return true; }
protected void compute( Band band, ExpressionRuntime runtime ) { if ( band.getComputedStyle().getBooleanStyleProperty( ElementStyleKeys.VISIBLE ) == false ) { return; } try { this.runtime = runtime; inspectElement( band ); traverseSection( band ); } finally { this.runtime = null; } }
protected DataRow computeData( Band band, ExpressionRuntime runtime ) { if ( band.getComputedStyle().getBooleanStyleProperty( ElementStyleKeys.VISIBLE ) == false ) { return new StaticDataRow(); } this.values.clear(); compute( band, runtime ); return new StaticDataRow( values ); }
public void compute( final Band band, final ExpressionRuntime runtime, final OutputStream out ) throws ReportProcessingException, ContentProcessingException, IOException { SimpleStyleSheet computedStyle = band.getComputedStyle(); if ( computedStyle.getBooleanStyleProperty( ElementStyleKeys.VISIBLE ) == false ) { return; } this.excelPrinter.startSection( band, cellHeights ); compute( band, runtime ); this.excelPrinter.endSection( band, backgroundCells ); }
collectedReports.clear(); final SimpleStyleSheet styleSheet = band.getComputedStyle(); final boolean invConsSpace = builder.isEmptyElementsHaveSignificance(); if ( invConsSpace || isElementProcessable( band, styleSheet ) ) {
protected boolean isPageFooterPrintable( final Band b, final boolean testSticky ) { final StyleSheet resolverStyleSheet = b.getComputedStyle(); if ( testSticky && resolverStyleSheet.getBooleanStyleProperty( BandStyleKeys.STICKY ) == false ) { return false; } if ( computeCurrentPage() == 1 ) { if ( resolverStyleSheet.getBooleanStyleProperty( BandStyleKeys.DISPLAY_ON_FIRSTPAGE ) == true ) { return true; } else { return false; } } else if ( isLastPagebreak() ) { if ( resolverStyleSheet.getBooleanStyleProperty( BandStyleKeys.DISPLAY_ON_LASTPAGE ) == true ) { return true; } else { return false; } } else { return true; } }
private boolean isPageHeaderPrinting( final Band b, final boolean testSticky ) { final StyleSheet resolverStyleSheet = b.getComputedStyle(); if ( resolverStyleSheet == null ) { throw new InvalidReportStateException( "Inv" ); } if ( isDesignTime() ) { return true; } if ( testSticky && resolverStyleSheet.getBooleanStyleProperty( BandStyleKeys.STICKY ) == false ) { return false; } final boolean displayOnFirstPage = resolverStyleSheet.getBooleanStyleProperty( BandStyleKeys.DISPLAY_ON_FIRSTPAGE ); if ( computeCurrentPage() == 1 && displayOnFirstPage == false ) { return false; } final boolean displayOnLastPage = resolverStyleSheet.getBooleanStyleProperty( BandStyleKeys.DISPLAY_ON_LASTPAGE ); if ( isLastPagebreak() && ( displayOnLastPage == false ) ) { return false; } return true; }
public void endSection( final Band band, final ArrayList<CellLayoutInfo> backgroundCells ) { for ( final CellLayoutInfo layoutInfo : backgroundCells ) { int col = layoutInfo.getX1(); int row = layoutInfo.getY1() + rowOffset; final Cell cell = getCellAt( col, row ); final CellStyle style = getCellStyleProducer().createCellStyle( null, null, layoutInfo.getBackground() ); if ( style != null ) { cell.setCellStyle( style ); } } if ( band.getComputedStyle().getBooleanStyleProperty( BandStyleKeys.PAGEBREAK_AFTER ) ) { closeSheet(); } this.rowOffset += cellHeights.length; for ( int i = 0; i < cellHeights.length; i++ ) { this.rowHeightOffset += cellHeights[i]; } }
public void startSection( final Band band, final long[] cellHeights ) { this.cellHeights = cellHeights; this.sheetLayout.reinit( rowHeightOffset, cellHeights ); if ( band.getComputedStyle().getBooleanStyleProperty( BandStyleKeys.PAGEBREAK_BEFORE ) ) { closeSheet(); } if ( cellHeights.length > 0 && sheet == null ) { SheetPropertyCollector collector = new SheetPropertyCollector(); String sheetName = collector.compute( band ); sheet = openSheet( sheetName ); configureSheetColumnWidths( sheet, sheetLayout, sheetLayout.getColumnCount() ); configureSheetPaperSize( sheet, new PhysicalPageBox( pageDefinition.getPageFormat( 0 ), 0, 0 ) ); configureSheetProperties( sheet, collector ); rowOffset = 0; } for ( int r = 0; r < cellHeights.length; r += 1 ) { getRowAt( r + rowOffset ).setHeightInPoints( (float) StrictGeomUtility.toExternalValue( cellHeights[r] ) ); } }