Examples of StyleBuilder


Examples of org.pentaho.reporting.engine.classic.core.modules.output.table.html.helper.StyleBuilder

                                              final int row,
                                              final int col,
                                              final FastGridLayout.GridCell gridCell,
                                              final ReportElement content)
  {
    StyleBuilder styleBuilder = getStyleBuilder();
    DefaultStyleBuilderFactory styleBuilderFactory = getStyleBuilderFactory();
    FastHtmlStyleCache.CellStyle cellStyleCache = styleCache.getCellAttributes(row, col);
    if (cellStyleCache == null)
    {
      final CellBackground realBackground = gridCell.getLayoutInfo().getBackground();
      final int colSpan = gridCell.getLayoutInfo().getColumnSpan();
      final int rowSpan = gridCell.getLayoutInfo().getRowSpan();

      if (content == null)
      {
        final StyleBuilder cellStyle = styleBuilderFactory.createCellStyle(styleBuilder, realBackground, null, null);
        final AttributeList cellAttributes = getTagHelper().createCellAttributes
            (colSpan, rowSpan, null, null, realBackground, cellStyle);
        cellStyleCache = new FastHtmlStyleCache.CellStyle(cellAttributes, cellStyle.toArray());
      }
      else
      {
        BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(content.getComputedStyle());
        final StyleBuilder cellStyle = styleBuilderFactory.createCellStyle(styleBuilder,
            content.getComputedStyle(), boxDefinition, realBackground, null, null);
        final AttributeList cellAttributes = getTagHelper().createCellAttributes
            (colSpan, rowSpan, content.getAttributes(), content.getComputedStyle(), realBackground, cellStyle);
        cellStyleCache = new FastHtmlStyleCache.CellStyle(cellAttributes, cellStyle.toArray());
      }
      styleCache.putCellAttributes(row, col, cellStyleCache);
    }
    return cellStyleCache;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.