Examples of CTBooleanProperty


Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty

    assertNotNull(xssfFont.getCTFont());
  }

  public void testBoldweight() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTBooleanProperty bool=ctFont.addNewB();
    bool.setVal(false);
    ctFont.setBArray(0,bool);
    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(false, xssfFont.getBold());

View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty

    assertEquals("Courier",ctFont.getNameArray(0).getVal());
  }

  public void testItalic() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTBooleanProperty bool=ctFont.addNewI();
    bool.setVal(false);
    ctFont.setIArray(0,bool);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(false, xssfFont.getItalic());
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty

    assertEquals(true,ctFont.getIArray(0).getVal());
  }

  public void testStrikeout() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTBooleanProperty bool=ctFont.addNewStrike();
    bool.setVal(false);
    ctFont.setStrikeArray(0,bool);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(false, xssfFont.getStrikeout());
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty

     * get a boolean value for the boldness to use.
     *
     * @return boolean - bold
     */
    public boolean getBold() {
        CTBooleanProperty bold = _ctFont.sizeOfBArray() == 0 ? null : _ctFont.getBArray(0);
        return (bold != null && bold.getVal());
    }
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty

     * get a boolean value that specify whether to use italics or not
     *
     * @return boolean - value for italic
     */
    public boolean getItalic() {
        CTBooleanProperty italic = _ctFont.sizeOfIArray() == 0 ? null : _ctFont.getIArray(0);
        return italic != null && italic.getVal();
    }
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty

     * get a boolean value that specify whether to use a strikeout horizontal line through the text or not
     *
     * @return boolean - value for strikeout
     */
    public boolean getStrikeout() {
        CTBooleanProperty strike = _ctFont.sizeOfStrikeArray() == 0 ? null : _ctFont.getStrikeArray(0);
        return strike != null && strike.getVal();
    }
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty

     *
     * @param bold - boldness to use
     */
    public void setBold(boolean bold) {
        if(bold){
            CTBooleanProperty ctBold = _ctFont.sizeOfBArray() == 0 ? _ctFont.addNewB() : _ctFont.getBArray(0);
            ctBold.setVal(bold);
        } else {
            _ctFont.setBArray(null);
        }
    }
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty

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

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty

     * @param strikeout - value for strikeout or not
     */
    public void setStrikeout(boolean strikeout) {
        if(!strikeout) _ctFont.setStrikeArray(null);
        else {
            CTBooleanProperty strike = _ctFont.sizeOfStrikeArray() == 0 ? _ctFont.addNewStrike() : _ctFont.getStrikeArray(0);
            strike.setVal(strikeout);
        }
    }
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty

    assertNotNull(xssfFont.getCTFont());
  }

  public void testBoldweight() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTBooleanProperty bool=ctFont.addNewB();
    bool.setVal(false);
    ctFont.setBArray(0,bool);
    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(false, xssfFont.getBold());

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.