List of usage examples for org.apache.poi.ss.usermodel FontCharset DEFAULT
FontCharset DEFAULT
To view the source code for org.apache.poi.ss.usermodel FontCharset DEFAULT.
Click Source Link
From source file:net.mcnewfamily.rmcnew.model.excel.FontEssence.java
License:Open Source License
public XSSFFont toXSSFFont(XSSFWorkbook workbook) { XSSFFont xssfFont = null;/*w w w . j av a2s . co m*/ if (workbook != null) { xssfFont = workbook.createFont(); xssfFont.setCharSet(FontCharset.DEFAULT); xssfFont.setFamily(this.fontFamily); xssfFont.setBold(this.bold); if (this.bold) { xssfFont.setBoldweight(Font.BOLDWEIGHT_BOLD); } else { xssfFont.setBoldweight(Font.BOLDWEIGHT_NORMAL); } xssfFont.setItalic(this.italic); if (this.underline) { xssfFont.setUnderline(FontUnderline.SINGLE); } xssfFont.setStrikeout(this.strikeout); xssfFont.setColor(this.color); xssfFont.setFontHeightInPoints(this.fontHeightInPoints); } else { throw new IllegalArgumentException("Cannot create XSSFFont in a null XSSFWorkbook!"); } return xssfFont; }