Examples of CTUnderlineProperty


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

    assertEquals(20.0, ctFont.getSzArray(0).getVal(), 0.0);
  }

  public void testUnderline() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTUnderlineProperty underlinePropr=ctFont.addNewU();
    underlinePropr.setVal(STUnderlineValues.SINGLE);
    ctFont.setUArray(0,underlinePropr);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(Font.U_SINGLE, xssfFont.getUnderline());
View Full Code Here

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

     *
     * @return byte - underlining type
     * @see org.apache.poi.ss.usermodel.FontUnderline
     */
    public byte getUnderline() {
        CTUnderlineProperty underline = _ctFont.sizeOfUArray() == 0 ? null : _ctFont.getUArray(0);
        if (underline != null) {
            FontUnderline val = FontUnderline.valueOf(underline.getVal().intValue());
            return val.getByteValue();
        }
        return Font.U_NONE;
    }
View Full Code Here

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

     */
    public void setUnderline(FontUnderline underline) {
        if(underline == FontUnderline.NONE && _ctFont.sizeOfUArray() > 0){
            _ctFont.setUArray(null);
        } else {
            CTUnderlineProperty ctUnderline = _ctFont.sizeOfUArray() == 0 ? _ctFont.addNewU() : _ctFont.getUArray(0);
            STUnderlineValues.Enum val = STUnderlineValues.Enum.forInt(underline.getValue());
            ctUnderline.setVal(val);
        }
    }
View Full Code Here

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

     * @see #U_SINGLE_ACCOUNTING
     * @see #U_DOUBLE_ACCOUNTING
     */
    public short getUnderlineType(){
        if(_font.sizeOfUArray() == 0) return U_NONE;
        CTUnderlineProperty u = _font.getUArray(0);
        switch(u.getVal().intValue()){
            case STUnderlineValues.INT_SINGLE: return U_SINGLE;
            case STUnderlineValues.INT_DOUBLE: return U_DOUBLE;
            case STUnderlineValues.INT_SINGLE_ACCOUNTING: return U_SINGLE_ACCOUNTING;
            case STUnderlineValues.INT_DOUBLE_ACCOUNTING: return U_DOUBLE_ACCOUNTING;
            default: return U_NONE;
View Full Code Here

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

    assertEquals(new Double(20).doubleValue(),ctFont.getSzArray(0).getVal());
  }

  public void testUnderline() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTUnderlineProperty underlinePropr=ctFont.addNewU();
    underlinePropr.setVal(STUnderlineValues.SINGLE);
    ctFont.setUArray(0,underlinePropr);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(Font.U_SINGLE, xssfFont.getUnderline());
View Full Code Here

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

    assertEquals(20.0, ctFont.getSzArray(0).getVal(), 0.0);
  }

  public void testUnderline() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTUnderlineProperty underlinePropr=ctFont.addNewU();
    underlinePropr.setVal(STUnderlineValues.SINGLE);
    ctFont.setUArray(0,underlinePropr);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(Font.U_SINGLE, xssfFont.getUnderline());
View Full Code Here

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

    assertEquals(20.0, ctFont.getSzArray(0).getVal(), 0.0);
  }

  public void testUnderline() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTUnderlineProperty underlinePropr=ctFont.addNewU();
    underlinePropr.setVal(STUnderlineValues.SINGLE);
    ctFont.setUArray(0,underlinePropr);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(Font.U_SINGLE, xssfFont.getUnderline());
View Full Code Here

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

     *
     * @return byte - underlining type
     * @see org.apache.poi.ss.usermodel.FontUnderline
     */
    public byte getUnderline() {
        CTUnderlineProperty underline = _ctFont.sizeOfUArray() == 0 ? null : _ctFont.getUArray(0);
        if (underline != null) {
            FontUnderline val = FontUnderline.valueOf(underline.getVal().intValue());
            return val.getByteValue();
        }
        return Font.U_NONE;
    }
View Full Code Here

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

     */
    public void setUnderline(FontUnderline underline) {
        if(underline == FontUnderline.NONE && _ctFont.sizeOfUArray() > 0){
            _ctFont.setUArray(null);
        } else {
            CTUnderlineProperty ctUnderline = _ctFont.sizeOfUArray() == 0 ? _ctFont.addNewU() : _ctFont.getUArray(0);
            STUnderlineValues.Enum val = STUnderlineValues.Enum.forInt(underline.getValue());
            ctUnderline.setVal(val);
        }
    }
View Full Code Here

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

    assertEquals(20.0, ctFont.getSzArray(0).getVal(), 0.0);
  }

  public void testUnderline() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTUnderlineProperty underlinePropr=ctFont.addNewU();
    underlinePropr.setVal(STUnderlineValues.SINGLE);
    ctFont.setUArray(0,underlinePropr);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(Font.U_SINGLE, xssfFont.getUnderline());
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.