Examples of applyFont()


Examples of org.apache.poi.ss.usermodel.RichTextString.applyFont()

          final HSSFFontWrapper font = o.getFont();
          if (i == (buffer.size() - 1))
          {
            // Last element ..
            final int endPosition = Math.min(32767, text.length());
            rtStr.applyFont(position, endPosition, fontFactory.getExcelFont(font));
          }
          else
          {
            final RichTextFormat next = (RichTextFormat) buffer.get(i + 1);
            final int endPosition = Math.min(32767, next.getPosition());
View Full Code Here

Examples of org.apache.poi.ss.usermodel.RichTextString.applyFont()

          }
          else
          {
            final RichTextFormat next = (RichTextFormat) buffer.get(i + 1);
            final int endPosition = Math.min(32767, next.getPosition());
            rtStr.applyFont(position, endPosition, fontFactory.getExcelFont(font));
          }
        }
        return rtStr;
      }
    }
View Full Code Here

Examples of org.apache.poi.ss.usermodel.RichTextString.applyFont()

          final HSSFFontWrapper font = o.getFont();
          if (i == (buffer.size() - 1))
          {
            // Last element ..
            final int endPosition = Math.min(32767, text.length());
            rtStr.applyFont(position, endPosition, fontFactory.getExcelFont(font));
          }
          else
          {
            final RichTextFormat next = buffer.get(i + 1);
            final int endPosition = Math.min(32767, next.getPosition());
View Full Code Here

Examples of org.apache.poi.ss.usermodel.RichTextString.applyFont()

          }
          else
          {
            final RichTextFormat next = buffer.get(i + 1);
            final int endPosition = Math.min(32767, next.getPosition());
            rtStr.applyFont(position, endPosition, fontFactory.getExcelFont(font));
          }
        }
        return rtStr;
      }
    }
View Full Code Here

Examples of org.apache.poi.ss.usermodel.RichTextString.applyFont()

          final int position = o.getPosition();
          final HSSFFontWrapper font = o.getFont();
          if (i == (buffer.size() - 1))
          {
            // Last element ..
            rtStr.applyFont(position, text.length(), fontFactory.getExcelFont(font));
          }
          else
          {
            final RichTextFormat next = buffer.get(i + 1);
            rtStr.applyFont(position, next.getPosition(), fontFactory.getExcelFont(font));
View Full Code Here

Examples of org.apache.poi.ss.usermodel.RichTextString.applyFont()

            rtStr.applyFont(position, text.length(), fontFactory.getExcelFont(font));
          }
          else
          {
            final RichTextFormat next = buffer.get(i + 1);
            rtStr.applyFont(position, next.getPosition(), fontFactory.getExcelFont(font));
          }
        }
        return rtStr;
      }
      else
View Full Code Here

Examples of org.apache.poi.ss.usermodel.RichTextString.applyFont()

        XSSFRow row = sheet.createRow(0);
        XSSFCell cell = row.createCell(0);

        XSSFFont font = wb.createFont();
        RichTextString rts = factory.createRichTextString("");
        rts.applyFont(font);
        cell.setCellValue(rts);

        sheet.autoSizeColumn(0);
    }
View Full Code Here

Examples of org.apache.poi.ss.usermodel.RichTextString.applyFont()

        XSSFRow row = sheet.createRow(0);
        XSSFCell cell = row.createCell(0);

        XSSFFont font = wb.createFont();
        RichTextString rts = factory.createRichTextString("");
        rts.applyFont(font);
        cell.setCellValue(rts);

        sheet.autoSizeColumn(0);
    }
View Full Code Here

Examples of org.apache.poi.ss.usermodel.RichTextString.applyFont()

        XSSFRow row = sheet.createRow(0);
        XSSFCell cell = row.createCell(0);

        XSSFFont font = wb.createFont();
        RichTextString rts = factory.createRichTextString("");
        rts.applyFont(font);
        cell.setCellValue(rts);

        sheet.autoSizeColumn(0);
    }
View Full Code Here

Examples of org.apache.poi.ss.usermodel.RichTextString.applyFont()

      
       // Check the text has the newline
       assertEquals(text, richTextString.getString());
      
       // Apply the font
       richTextString.applyFont(0, 3, font1);
       cell.setCellValue(richTextString);

       // To enable newlines you need set a cell styles with wrap=true
       CellStyle cs = wb.createCellStyle();
       cs.setWrapText(true);
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.