Search in sources :

Example 6 with CTBooleanProperty

use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty in project poi by apache.

the class XSSFFont method setItalic.

/**
     * set a boolean value for the property specifying whether to use italics or not
     * If omitted, the default value is true.
     *
     * @param italic - value for italics or not
     */
public void setItalic(boolean italic) {
    if (italic) {
        CTBooleanProperty bool = _ctFont.sizeOfIArray() == 0 ? _ctFont.addNewI() : _ctFont.getIArray(0);
        bool.setVal(italic);
    } else {
        _ctFont.setIArray(null);
    }
}
Also used : CTBooleanProperty(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty)

Aggregations

CTBooleanProperty (org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty)6 Test (org.junit.Test)3 CTFont (org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont)3