Examples of createCellStyle()


Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.createCellStyle()

        Workbook wb = new XSSFWorkbook()//or new HSSFWorkbook();
        Sheet sheet = wb.createSheet("Fonts");

        Font font0 = wb.createFont();
        font0.setColor(IndexedColors.BROWN.getIndex());
        CellStyle style0 = wb.createCellStyle();
        style0.setFont(font0);

        Font font1 = wb.createFont();
        font1.setFontHeightInPoints((short)14);
        font1.setFontName("Courier New");
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.createCellStyle()

        Font font1 = wb.createFont();
        font1.setFontHeightInPoints((short)14);
        font1.setFontName("Courier New");
        font1.setColor(IndexedColors.RED.getIndex());
        CellStyle style1 = wb.createCellStyle();
        style1.setFont(font1);

        Font font2 = wb.createFont();
        font2.setFontHeightInPoints((short)16);
        font2.setFontName("Arial");
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.createCellStyle()

        Font font2 = wb.createFont();
        font2.setFontHeightInPoints((short)16);
        font2.setFontName("Arial");
        font2.setColor(IndexedColors.GREEN.getIndex());
        CellStyle style2 = wb.createCellStyle();
        style2.setFont(font2);

        Font font3 = wb.createFont();
        font3.setFontHeightInPoints((short)18);
        font3.setFontName("Times New Roman");
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.createCellStyle()

        Font font3 = wb.createFont();
        font3.setFontHeightInPoints((short)18);
        font3.setFontName("Times New Roman");
        font3.setColor(IndexedColors.LAVENDER.getIndex());
        CellStyle style3 = wb.createCellStyle();
        style3.setFont(font3);

        Font font4 = wb.createFont();
        font4.setFontHeightInPoints((short)18);
        font4.setFontName("Wingdings");
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.createCellStyle()

        Font font4 = wb.createFont();
        font4.setFontHeightInPoints((short)18);
        font4.setFontName("Wingdings");
        font4.setColor(IndexedColors.GOLD.getIndex());
        CellStyle style4 = wb.createCellStyle();
        style4.setFont(font4);

        Font font5 = wb.createFont();
        font5.setFontName("Symbol");
        CellStyle style5 = wb.createCellStyle();
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.createCellStyle()

        CellStyle style4 = wb.createCellStyle();
        style4.setFont(font4);

        Font font5 = wb.createFont();
        font5.setFontName("Symbol");
        CellStyle style5 = wb.createCellStyle();
        style5.setFont(font5);

        Cell cell0 = sheet.createRow(0).createCell(1);
        cell0.setCellValue("Default");
        cell0.setCellStyle(style0);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.output.table.html.helper.DefaultStyleBuilderFactory.createCellStyle()

          final int rowSpan = sheetLayout.getRowSpan(row, content.getY() + content.getHeight() + contentOffset);

          final CellBackground realBackground = cellBackgroundProducer.getBackgroundForBox
              (logicalPage, sheetLayout, col, row, colSpan, rowSpan, true, sectionType, content);

          final StyleBuilder cellStyle = styleBuilderFactory.createCellStyle(styleBuilder,
              content.getStyleSheet(), content.getBoxDefinition(), realBackground, null, null);
          final AttributeList cellAttributes = getTagHelper().createCellAttributes
              (colSpan, rowSpan, content.getAttributes(), content.getStyleSheet(), realBackground, cellStyle);
          xmlWriter.writeTag(HtmlPrinter.XHTML_NAMESPACE, "td", cellAttributes, XmlWriterSupport.OPEN);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.output.table.html.helper.DefaultStyleBuilderFactory.createCellStyle()

      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
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.output.table.html.helper.DefaultStyleBuilderFactory.createCellStyle()

        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());
      }
View Full Code Here

Examples of org.zkoss.poi.ss.usermodel.Workbook.createCellStyle()

        for (int col = lCol; col <= rCol; ++col) {
          final Cell cell = BookHelper.getCell(sheet, row, col);
          final CellStyle style = cell != null ? cell.getCellStyle() : null;
          final String oldFormat = style != null ? style.getDataFormatString() : null;
          if (oldFormat == null || "General".equals(oldFormat)) {
            CellStyle newCellStyle = book.createCellStyle();
            if (style != null) {
              newCellStyle.cloneStyleFrom(style);
            }
            BookHelper.setDataFormat(book, newCellStyle, formatString); //prepare a DataFormat with the specified formatString
            BookHelper.setCellStyle(sheet, row, col, row, col, newCellStyle);
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.