Example usage for org.apache.poi.ss.usermodel Font setItalic

List of usage examples for org.apache.poi.ss.usermodel Font setItalic

Introduction

In this page you can find the example usage for org.apache.poi.ss.usermodel Font setItalic.

Prototype


void setItalic(boolean italic);

Source Link

Document

set whether to use italics or not

Usage

From source file:utils.RecordsWriter.java

License:Open Source License

private HSSFCellStyle style() {

    HSSFCellStyle style = workbook.createCellStyle();
    style.setAlignment(CellStyle.ALIGN_CENTER);
    Font font = workbook.createFont();
    font.setFontHeightInPoints((short) 16);
    font.setFontName("Courier New");
    font.setItalic(true);
    style.setFont(font);//from   ww w  .j  a v  a2 s  .  c  om
    return style;
}